/* Search for a app which has same sender and stop adv is running */
if (!strncasecmp(app->sender, name, strlen(name)) && app->is_initialized == TRUE) {
- BT_DBG("Match found, name: %s", name);
+ BT_DBG("numapps[%d] Match found, name: %s", k, name);
/* TODO 2: Need to manage app info as list, not array.
This loop always run for MAX count if any apps are terminated.
info = &numapps[k];
if (info->instance_id == event->gatt_srvc_stat.server_inst) {
- BT_INFO("Found GATT Server.. UUID [%s], sender [%s]", info->uuid, info->sender);
+ BT_INFO("numapps[%d] Found GATT Server.. UUID [%s], sender [%s]", k, info->uuid, info->sender);
__bt_gatt_handle_pending_request_info(result, BT_GATT_SERVER_ADD_SERVICE,
(int*)&svc_handle, sizeof(int));
if (svc_handle > 0) {
handle = g_malloc0(sizeof(int));
*handle = svc_handle;
- numapps[event->gatt_srvc_stat.server_inst].service_handles = g_slist_append(numapps[event->gatt_srvc_stat.server_inst].service_handles, handle);
- count = g_slist_length(numapps[event->gatt_srvc_stat.server_inst].service_handles);
+ numapps[k].service_handles = g_slist_append(numapps[k].service_handles, handle);
+ count = g_slist_length(numapps[k].service_handles);
BT_INFO("Added Service handle [%d] to list..current count [%d]", svc_handle, count);
}
break;