framework/src/st_things/things_stack/utils/things_network.c
//--------------------------------------------------------------------------------
/**
 * Function definition for clean the global scan list.
 */
Function definition for clean the global scan list.
Function definition for clean the global scan list .
void things_wifi_list_cleanup(void)
{
	if (g_wifi_scan_info != NULL) {
		access_point_info_s* piter;
		access_point_info_s* pdel;
		piter = pdel = g_wifi_scan_info;
		while (piter != NULL) {
			pdel = piter;
			piter = piter->next;	
			things_free(pdel);	
		}
		g_wifi_scan_info = NULL;	
	}
	g_wifi_count = 0;		
}
void things_wifi_list_cleanup ( void ) { if ( g_wifi_scan_info != NULL ) { access_point_info_s * piter ; access_point_info_s * pdel ; piter = pdel = g_wifi_scan_info ; while ( piter != NULL ) { pdel = piter ; piter = piter -> next ; things_free ( pdel ) ; } g_wifi_scan_info = NULL ; } g_wifi_count = 0 ; }
Function definition for clean the global scan list.
Function definition for clean the global scan list .
// Free old wifi list. // Copy the starting location of list. // Move to the next node. // Dlete the current node. // Make the global scan list NULL. // Set the count of wifi scan list to 0.