Modified log for service and technology state 06/147006/1 accepted/tizen/4.0/unified/20170901.202629 submit/tizen_4.0/20170831.131058
authortaesub kim <taesub.kim@samsung.com>
Tue, 29 Aug 2017 00:07:39 +0000 (09:07 +0900)
committertaesub kim <taesub.kim@samsung.com>
Thu, 31 Aug 2017 12:45:56 +0000 (21:45 +0900)
Change-Id: I8b7d391c79463f53bff86cc75f53b5a6ee926a71
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
src/network-state.c
src/wifi-state.c

index 4c26944..2c66a1e 100755 (executable)
@@ -450,7 +450,7 @@ static void __netconfig_update_default_connection_info(void)
        if (profile == NULL)
                DBG("Reset network state configuration");
        else
-               DBG("%s: ip(%s) ip6(%s) proxy(%s)", profile, ip_addr, ip_addr6, proxy_addr);
+               DBG("profile[%s] ipv4(%s) ipv6(%s) proxy(%s)", profile, ip_addr, ip_addr6, proxy_addr);
 
        netconfig_vconf_get_int(VCONFKEY_NETWORK_STATUS, &old_network_status);
 
index 4fb0e44..40d0a95 100755 (executable)
@@ -44,6 +44,52 @@ static GSList *notifier_list = NULL;
 static guint network_connected_popup_timer_id = 0;
 static gboolean block_network_connected_popup = FALSE;
 
+static const char *_convert_wifi_service_state_to_string(wifi_service_state_e wifi_service_state_type)
+{
+       switch (wifi_service_state_type) {
+       case NETCONFIG_WIFI_UNKNOWN:
+               return "unknown";
+       case NETCONFIG_WIFI_IDLE:
+               return "idle";
+       case NETCONFIG_WIFI_ASSOCIATION:
+               return "association";
+       case NETCONFIG_WIFI_CONFIGURATION:
+               return "configuration";
+       case NETCONFIG_WIFI_CONNECTED:
+               return "connected";
+       case NETCONFIG_WIFI_FAILURE:
+               return "failure";
+       default:
+               ERR("Invalid wifi_service_state_e parameter");
+               break;
+       }
+
+       return "Invalid parameter";
+}
+
+static const char *_convert_wifi_technology_state_to_string(wifi_tech_state_e wifi_tech_state_type)
+{
+       switch (wifi_tech_state_type) {
+       case NETCONFIG_WIFI_TECH_UNKNOWN:
+               return "unknown";
+       case NETCONFIG_WIFI_TECH_OFF:
+               return "off";
+       case NETCONFIG_WIFI_TECH_WPS_ONLY:
+               return "wps only";
+       case NETCONFIG_WIFI_TECH_POWERED:
+               return "powered";
+       case NETCONFIG_WIFI_TECH_CONNECTED:
+               return "connected";
+       case NETCONFIG_WIFI_TECH_TETHERED:
+               return "tethered";
+       default:
+               ERR("Invalid wifi_tech_state_e parameter");
+               break;
+       }
+
+       return "Invalid parameter";
+}
+
 static gboolean _block_network_connection_popup(gpointer data)
 {
        block_network_connected_popup = FALSE;
@@ -527,7 +573,8 @@ void wifi_state_set_service_state(wifi_service_state_e new_state)
                return;
 
        g_service_state = new_state;
-       DBG("Wi-Fi state %d ==> %d", old_state, new_state);
+       DBG("Wi-Fi service state, old state[%s] ==> new state[%s]",
+               _convert_wifi_service_state_to_string(old_state), _convert_wifi_service_state_to_string(new_state));
 
        /* During DHCP, temporarily disable Wi-Fi power saving */
        if ((old_state < NETCONFIG_WIFI_ASSOCIATION || old_state == NETCONFIG_WIFI_FAILURE) && new_state == NETCONFIG_WIFI_CONFIGURATION) {
@@ -596,7 +643,8 @@ void wifi_state_set_tech_state(wifi_tech_state_e new_state)
 
        g_tech_state = new_state;
 
-       DBG("Wi-Fi technology state %d ==> %d", old_state, new_state);
+       DBG("Wi-Fi technology state, old state[%s] ==> new state[%s]",
+               _convert_wifi_technology_state_to_string(old_state), _convert_wifi_technology_state_to_string(new_state));
 }
 
 wifi_tech_state_e wifi_state_get_technology_state(void)