Index: opensync-2.0.5.0/src/sm/src/sm_scan_schedule.c =================================================================== --- opensync-2.0.5.0.orig/src/sm/src/sm_scan_schedule.c +++ opensync-2.0.5.0/src/sm/src/sm_scan_schedule.c @@ -155,6 +155,14 @@ clean: /* Remove processed context */ ds_dlist_remove_head(&g_scan_ctx_list); + if (scan_ctx) { + LOG(DEBUG, "sm_scan_schedule_cb. Scan done. Deleting scan_ctx. %p. %s %s %d\n", + scan_ctx, + radio_get_name_from_type(scan_ctx->scan_request.radio_cfg->type), + radio_get_scan_name_from_type(scan_ctx->scan_request.scan_type), + scan_ctx->scan_request.chan_list[0]); + } + sm_scan_ctx_free(scan_ctx); scan_ctx = NULL; @@ -163,6 +171,13 @@ clean: if (scan_ctx) { scan_status = true; + + LOG(DEBUG, "sm_scan_schedule_cb. Schedule next scan request. %p. %s %s %d\n", + scan_ctx, + radio_get_name_from_type(scan_ctx->scan_request.radio_cfg->type), + radio_get_scan_name_from_type(scan_ctx->scan_request.scan_type), + scan_ctx->scan_request.chan_list[0]); + rc = sm_scan_schedule_process ( scan_ctx); @@ -303,6 +318,12 @@ bool sm_scan_schedule( if (NULL == scan_in_progress) { /* Trigger the scan and wait for results */ + LOG(DEBUG, "sm_scan_schedule. Schedule scan request. %p. %s %s %d\n", + scan_ctx, + radio_get_name_from_type(scan_ctx->scan_request.radio_cfg->type), + radio_get_scan_name_from_type(scan_ctx->scan_request.scan_type), + scan_ctx->scan_request.chan_list[0]); + rc = sm_scan_schedule_process( scan_ctx);