diff options
author | Etan Cohen <etancohen@google.com> | 2015-03-31 10:41:53 -0700 |
---|---|---|
committer | Etan Cohen <etancohen@google.com> | 2015-03-31 10:41:53 -0700 |
commit | e1a9e52ff59d36bd1bb5b7b3a02fafba6394edfe (patch) | |
tree | 0a82ebb8b0be6acf27f7cbf38a44c9f70425e141 /stack/gatt/gatt_attr.c | |
parent | dd05445e57161ac40ae8b37252ae9f453bb31e85 (diff) | |
parent | f7f839985b3931682363d2ef3b7c5cae55a842ee (diff) | |
download | android_system_bt-e1a9e52ff59d36bd1bb5b7b3a02fafba6394edfe.tar.gz android_system_bt-e1a9e52ff59d36bd1bb5b7b3a02fafba6394edfe.tar.bz2 android_system_bt-e1a9e52ff59d36bd1bb5b7b3a02fafba6394edfe.zip |
Merge commit 'f7f839985b3931682363d2ef3b7c5cae55a842ee' into merge
Change-Id: Iaaec1ea0bf3009b7e32a9a60f697631a3f56e889
Diffstat (limited to 'stack/gatt/gatt_attr.c')
-rw-r--r-- | stack/gatt/gatt_attr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/stack/gatt/gatt_attr.c b/stack/gatt/gatt_attr.c index 8773036bc..fe3fcc422 100644 --- a/stack/gatt/gatt_attr.c +++ b/stack/gatt/gatt_attr.c @@ -98,7 +98,7 @@ static tGATT_PROFILE_CLCB *gatt_profile_find_clcb_by_conn_id(UINT16 conn_id) return p_clcb; } - return p_clcb; + return NULL; } /******************************************************************************* @@ -122,7 +122,7 @@ static tGATT_PROFILE_CLCB *gatt_profile_find_clcb_by_bd_addr(BD_ADDR bda, tBT_TR return p_clcb; } - return p_clcb; + return NULL; } /******************************************************************************* @@ -151,7 +151,10 @@ tGATT_PROFILE_CLCB *gatt_profile_clcb_alloc (UINT16 conn_id, BD_ADDR bda, tBT_TR break; } } - return p_clcb; + if(i_clcb < GATT_MAX_APPS) + return p_clcb; + + return NULL; } /******************************************************************************* |