Tethering: Convert technology type to mobile_ap type 66/5666/1 accepted/tizen/ivi/genivi accepted/tizen/ivi/release tizen_ivi_genivi tizen_ivi_release accepted/tizen/20130912.103146 accepted/tizen/20130912.103209 accepted/tizen/20130912.153140 accepted/tizen/20130912.191138 accepted/tizen/20130912.195301 accepted/tizen/ivi/genivi/20140131.062215 accepted/tizen_ivi_release/20131120.050424 ivi_oct_m2 submit/tizen/20130912.080135 submit/tizen/20130912.090442 submit/tizen_ivi_genivi/20140131.061523 submit/tizen_ivi_release/20131120.030002
authorLiu, Guoqiang <guoqiangx.liu@intel.com>
Tue, 4 Jun 2013 08:57:09 +0000 (16:57 +0800)
committerZhang zhengguang <zhengguang.zhang@intel.com>
Fri, 12 Jul 2013 00:55:26 +0000 (08:55 +0800)
Signed-off-by: Liu, Guoqiang <guoqiangx.liu@intel.com>
src/mobileap_main.c

index 41dcf4c..31ca74c 100644 (file)
@@ -411,6 +411,21 @@ gboolean tethering_get_ip_forward_status(TetheringObject *obj, gint *forward_mod
        return TRUE;
 }
 
+mobile_ap_type_e _mobileap_type_convert(char *type)
+{
+       mobile_ap_type_e result = MOBILE_AP_TYPE_MAX;
+       if (type == NULL)
+               return result;
+
+       if (g_strcmp0(type,"wifi") == 0)
+               result = MOBILE_AP_TYPE_WIFI;
+       else if (g_strcmp0(type,"gadget") == 0)
+               result = MOBILE_AP_TYPE_USB;
+       else if (g_strcmp0(type,"bluetooth") == 0)
+               result = MOBILE_AP_TYPE_BT;
+
+       return result;
+}
 
 static DBusHandlerResult __dnsmasq_signal_filter(DBusConnection *conn,
                DBusMessage *msg, void *user_data)
@@ -447,9 +462,13 @@ static DBusHandlerResult __dnsmasq_signal_filter(DBusConnection *conn,
                }
                DBG("DhcpConnected signal : %s  %s  %s %s\n",
                                        ap_type, ip_addr, mac, name);
-
+               /*
                if (_get_tethering_type_from_ip(ip_addr, &type) != MOBILE_AP_ERROR_NONE)
                        return DBUS_HANDLER_RESULT_HANDLED;
+               */
+               type = _mobileap_type_convert(ap_type);
+               if (type == MOBILE_AP_TYPE_MAX)
+                       return DBUS_HANDLER_RESULT_HANDLED;
 
                if (_mobileap_is_enabled_by_type(type) == FALSE) {
                        DBG("Tethering[%d] is disabled. Ignore ACK\n", type);