From: Niraj Kumar Goit Date: Fri, 17 Nov 2017 09:28:47 +0000 (+0530) Subject: Initiate IP conflict detection for wifi and ethernet only. X-Git-Tag: submit/tizen/20171121.015732~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=595e9007a53b3617ab689d1ac0908f81c8fd2f35;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git Initiate IP conflict detection for wifi and ethernet only. Initiate IP conflict detection logic for wifi and ethernet network only. If device is connected to cellular network, IP conflict detection logic is not required as unique IP address is allocated by service provider. Change-Id: Ic96b6f98e89b2fae17717f65e038e9e7b830ede6 Signed-off-by: Niraj Kumar Goit --- diff --git a/src/signal-handler.c b/src/signal-handler.c index fb115ba..a858856 100755 --- a/src/signal-handler.c +++ b/src/signal-handler.c @@ -212,19 +212,21 @@ static void _service_signal_cb(GDBusConnection *conn, if (g_strcmp0(sigvalue, "State") == 0) { g_variant_get(variant, "s", &property); - if (g_strcmp0(property, "ready") == 0) { - for (idx = 0; idx < MAX_SOCKET_OPEN_RETRY; idx++) { - sd = start_ip_conflict_mon(); - if (sd != NULL) - break; + DBG("[%s] %s", property, path); + if (netconfig_is_wifi_profile(path) || netconfig_is_ethernet_profile(path)) { + if (g_strcmp0(property, "ready") == 0) { + for (idx = 0; idx < MAX_SOCKET_OPEN_RETRY; idx++) { + sd = start_ip_conflict_mon(); + if (sd != NULL) + break; + } + } else if (g_strcmp0(property, "online") == 0) { + // do nothing + } else { + stop_ip_conflict_mon(); } - } else if (g_strcmp0(property, "online") == 0) { - // do nothing - } else { - stop_ip_conflict_mon(); } - DBG("[%s] %s", property, path); if (netconfig_is_wifi_profile(path) == TRUE) { int wifi_state = 0;