A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/espressif/esp-idf/commit/bdfbb2fe73ca6a0a9bbf317e29179abe56a01c69 below:

Merge branch 'bugfix/crash_in_btc_hf_init_v5.0' into 'release/v5.0' · espressif/esp-idf@bdfbb2f · GitHub

File tree Expand file treeCollapse file tree 6 files changed

+29

-13

lines changed

Filter options

Expand file treeCollapse file tree 6 files changed

+29

-13

lines changed Original file line number Diff line number Diff line change

@@ -397,10 +397,6 @@ void bta_ag_rfc_close(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)

397 397 398 398

bta_sys_conn_close(BTA_ID_AG, p_scb->app_id, p_scb->peer_addr);

399 399 400 -

/* call close call-out */

401 -

#if (BTM_SCO_HCI_INCLUDED == TRUE)

402 -

bta_ag_sco_co_close();

403 -

#endif

404 400

/* call close cback */

405 401

(*bta_ag_cb.p_cback)(BTA_AG_CLOSE_EVT, (tBTA_AG *) &close);

406 402 Original file line number Diff line number Diff line change

@@ -61,7 +61,8 @@ static const uint8_t bta_hf_client_cb_data_size[] = {

61 61

sizeof(tBTA_HF_CLIENT_VAL), // #define BTA_HF_CLIENT_BSIR_EVT 19

62 62

sizeof(tBTA_HF_CLIENT_NUMBER), // #define BTA_HF_CLIENT_BINP_EVT 20

63 63

sizeof(tBTA_HF_CLIENT_VAL), // #define BTA_HF_CLIENT_RING_INDICATION 21

64 -

0, // #define BTA_HF_CLIENT_DISABLE_EVT 30

64 +

0, // #define BTA_HF_CLIENT_DISABLE_EVT 22

65 +

sizeof(tBTA_SCO_PKT_STAT_NUMS), // #define BTA_HF_CLIENT_PKT_STAT_NUMS_GET_EVT 23

65 66

};

66 67

/*****************************************************************************

67 68

** External Function Declarations

Original file line number Diff line number Diff line change

@@ -112,8 +112,8 @@ typedef UINT8 tBTA_HF_CLIENT_AT_RESULT_TYPE;

112 112

#define BTA_HF_CLIENT_BSIR_EVT 19 /* in-band ring tone setting changed event */

113 113

#define BTA_HF_CLIENT_BINP_EVT 20 /* binp number event */

114 114

#define BTA_HF_CLIENT_RING_INDICATION 21 /* HF Client ring indication */

115 -

#define BTA_HF_CLIENT_DISABLE_EVT 30 /* HF Client disabled */

116 -

#define BTA_HF_CLIENT_PKT_STAT_NUMS_GET_EVT 31 /* HF Client packet status nums */

115 +

#define BTA_HF_CLIENT_DISABLE_EVT 22 /* HF Client disabled */

116 +

#define BTA_HF_CLIENT_PKT_STAT_NUMS_GET_EVT 23 /* HF Client packet status nums */

117 117 118 118

typedef UINT8 tBTA_HF_CLIENT_EVT;

119 119 Original file line number Diff line number Diff line change

@@ -82,7 +82,7 @@ static bta_ag_co_cb_t *bta_ag_co_cb_ptr;

82 82

#define bta_ag_co_cb (*bta_ag_co_cb_ptr)

83 83

#endif /* HFP_DYNAMIC_MEMORY == FALSE */

84 84 85 -

static UINT8 hf_air_mode = BTM_SCO_AIR_MODE_TRANSPNT;

85 +

static UINT8 hf_air_mode = BTM_SCO_AIR_MODE_UNKNOWN;

86 86

static UINT8 hf_inout_pkt_size = 0;

87 87 88 88

/* =========================================================================

Original file line number Diff line number Diff line change

@@ -66,7 +66,7 @@ static UINT16 btc_max_hf_clients = BTC_HF_NUM_CB;

66 66

#if HFP_DYNAMIC_MEMORY == FALSE

67 67

static hf_local_param_t hf_local_param[BTC_HF_NUM_CB];

68 68

#else

69 -

static hf_local_param_t *hf_local_param;

69 +

static hf_local_param_t *hf_local_param = NULL;

70 70

#endif

71 71 72 72

#if (BTM_WBS_INCLUDED == TRUE)

@@ -315,6 +315,19 @@ bt_status_t btc_hf_init(void)

315 315

int idx = 0;

316 316 317 317

BTC_TRACE_DEBUG("%s - max_hf_clients=%d", __func__, btc_max_hf_clients);

318 + 319 +

#if HFP_DYNAMIC_MEMORY == TRUE

320 +

if (hf_local_param != NULL) {

321 +

return BT_STATUS_FAIL;

322 +

}

323 + 324 +

if ((hf_local_param = (hf_local_param_t *)osi_malloc(BTC_HF_NUM_CB * sizeof(hf_local_param_t))) == NULL) {

325 +

APPL_TRACE_ERROR("%s malloc failed!", __func__);

326 +

return BT_STATUS_NOMEM;

327 +

}

328 +

memset((void *)hf_local_param, 0, BTC_HF_NUM_CB * sizeof(hf_local_param_t));

329 +

#endif

330 + 318 331

/* Invoke the enable service API to the core to set the appropriate service_id

319 332

* Internally, the HSP_SERVICE_ID shall also be enabled if HFP is enabled (phone)

320 333

* othwerwise only HSP is enabled (tablet)*/

@@ -341,13 +354,16 @@ void btc_hf_deinit(void)

341 354

{

342 355

BTC_TRACE_EVENT("%s", __FUNCTION__);

343 356

btc_dm_disable_service(BTA_HFP_SERVICE_ID);

357 +

hf_local_param[0].btc_hf_cb.initialized = false;

358 +

}

359 + 360 +

static void btc_hf_cb_release(void)

361 +

{

344 362

#if HFP_DYNAMIC_MEMORY == TRUE

345 363

if (hf_local_param) {

346 364

osi_free(hf_local_param);

347 365

hf_local_param = NULL;

348 366

}

349 -

#else

350 -

hf_local_param[0].btc_hf_cb.initialized = false;

351 367

#endif

352 368

}

353 369

@@ -1247,9 +1263,12 @@ void btc_hf_cb_handler(btc_msg_t *msg)

1247 1263 1248 1264

switch (event) {

1249 1265

case BTA_AG_ENABLE_EVT:

1266 +

break;

1250 1267

case BTA_AG_DISABLE_EVT:

1268 +

{

1269 +

btc_hf_cb_release();

1251 1270

break;

1252 - 1271 +

}

1253 1272

case BTA_AG_REGISTER_EVT:

1254 1273

{

1255 1274

idx = p_data->hdr.handle - 1;

Original file line number Diff line number Diff line change

@@ -1010,7 +1010,7 @@

1010 1010

/* TRUE to include Sniff Subrating */

1011 1011

#if (BTA_DM_PM_INCLUDED == TRUE)

1012 1012

#ifndef BTM_SSR_INCLUDED

1013 -

#define BTM_SSR_INCLUDED TRUE

1013 +

#define BTM_SSR_INCLUDED FALSE

1014 1014

#endif

1015 1015

#endif /* BTA_DM_PM_INCLUDED */

1016 1016

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4