Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ffbb859 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "SDP: Only start discovery once" into oc-mr1-dev am: b811c7ef

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/bt/+/13202007

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8aec47cad617ef5d908677365ffba53dc16c5fb8
parents fc36e3a1 b811c7ef
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include "bta_sys.h"
#include "btif_config.h"
#include "btm_api.h"
#include "osi/include/log.h"
#include "osi/include/osi.h"
#include "sdp_api.h"
#include "utl.h"
@@ -476,6 +477,12 @@ void bta_ag_do_disc(tBTA_AG_SCB* p_scb, tBTA_SERVICE_MASK service) {
    }
  }

  if (p_scb->p_disc_db != nullptr) {
    android_errorWriteLog(0x534e4554, "174052148");
    APPL_TRACE_ERROR("Discovery already in progress... returning.");
    return;
  }

  /* allocate buffer for sdp database */
  p_scb->p_disc_db = (tSDP_DISCOVERY_DB*)osi_malloc(BTA_AG_DISC_BUF_SIZE);
  /* set up service discovery database; attr happens to be attr_list len */