[Model] All
[BinType] AP
[Customer] OPEN
[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A
[Problem] Duplicated gatt event occured for a same uuid.
[Cause & Measure] descriptor duplicated on list. Check the path before adding it.
[Checking Method] Service browsing
[Team] Convergence BT
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change
Change-Id: I897a7a6d4cebd06162159222ed3606b3fa4f5c64
Signed-off-by: injun.yang <injun.yang@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
static void _hal_gattc_add_descriptor(hal_gattc_char_t *gattc_char, char *desc_path)
{
hal_gattc_desc_t *gattc_desc = NULL;
+ GSList *l;
+
+ for (l = gattc_char->gatt_list_descs; l != NULL; l = g_slist_next(l)) {
+ gattc_desc = (hal_gattc_desc_t *)l->data;
+ if (gattc_desc == NULL)
+ continue;
+
+ if (g_strcmp0(gattc_desc->desc_path, desc_path) == 0)
+ return;
+ }
gattc_desc = g_malloc0(sizeof(hal_gattc_desc_t));
gattc_desc->desc_path = g_strdup(desc_path);