• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


Commit MetaInfo

Revisionde75b705a241a6e2003d1d2b1071ce8501631c63 (tree)
Zeit2017-05-27 02:34:55
AutorTreeHugger Robot <treehugger-gerrit@goog...>
CommiterAndroid (Google) Code Review

Log Message

Merge "Fix crashes when GAP operation is interrupted by disconnection" into oc-dev

Ändern Zusammenfassung

Diff

--- a/stack/gap/gap_ble.cc
+++ b/stack/gap/gap_ble.cc
@@ -87,15 +87,7 @@ tGAP_CLCB* gap_find_clcb_by_bd_addr(BD_ADDR bda) {
8787 return NULL;
8888 }
8989
90-/*******************************************************************************
91- *
92- * Function gap_ble_find_clcb_by_conn_id
93- *
94- * Description The function searches all LCB with macthing connection ID
95- *
96- * Returns total number of clcb found.
97- *
98- ******************************************************************************/
90+/* returns LCB with matching connection ID, or NULL if not found */
9991 tGAP_CLCB* gap_ble_find_clcb_by_conn_id(uint16_t conn_id) {
10092 uint8_t i_clcb;
10193 tGAP_CLCB* p_clcb = NULL;
@@ -107,7 +99,7 @@ tGAP_CLCB* gap_ble_find_clcb_by_conn_id(uint16_t conn_id) {
10799 }
108100 }
109101
110- return p_clcb;
102+ return NULL;
111103 }
112104
113105 /*******************************************************************************
@@ -132,10 +124,10 @@ tGAP_CLCB* gap_clcb_alloc(BD_ADDR bda) {
132124 p_clcb->in_use = true;
133125 memcpy(p_clcb->bda, bda, BD_ADDR_LEN);
134126 p_clcb->pending_req_q = fixed_queue_new(SIZE_MAX);
135- break;
127+ return p_clcb;
136128 }
137129 }
138- return p_clcb;
130+ return NULL;
139131 }
140132
141133 /*******************************************************************************