X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=plugin%2Ftether%2Fstc-plugin-tether.c;h=f1278f9e547cbf5c550fdb37937126afdd83f2fb;hb=e84a61cd98b1feee0503035f12fff31c7c535f69;hp=26415091ac78c18473ae05f87c0e3b60f027b927;hpb=4a8a80813b535e49d54701cf36fb309c09e1760a;p=platform%2Fcore%2Fconnectivity%2Fstc-manager.git diff --git a/plugin/tether/stc-plugin-tether.c b/plugin/tether/stc-plugin-tether.c old mode 100644 new mode 100755 index 2641509..f1278f9 --- a/plugin/tether/stc-plugin-tether.c +++ b/plugin/tether/stc-plugin-tether.c @@ -181,16 +181,16 @@ static void _mobileap_signal_cb(GDBusConnection *conn, STC_LOGI("%s interface(%s)", sig, interface); - sta = (tether_sta_info_s *)g_malloc0(sizeof(tether_sta_info_s)); - if (sta == NULL) { - STC_LOGE("g_malloc0 failed"); - return; - } - g_variant_get(param, "(susssu)", &state, &type, &ip, &mac, &hostname, &tm); STC_LOGI("%s: ip(%s) mac(%s) name(%s) tm(%d)", state, ip, mac, hostname, tm); if (!g_strcmp0(state, "DhcpConnected")) { + sta = (tether_sta_info_s *)g_malloc0(sizeof(tether_sta_info_s)); + if (sta == NULL) { + STC_LOGE("g_malloc0 failed"); + return; + } + g_strlcpy(sta->ip, ip, INET_ADDRSTRLEN); g_strlcpy(sta->mac, mac, STATION_MAC_STR_LEN); g_strlcpy(sta->name, hostname, STATION_STR_HOSTNAME_LEN);