emulator: remove legacy function for detecting tap netclient
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Sat, 30 May 2015 15:07:47 +0000 (00:07 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Tue, 2 Jun 2015 01:34:49 +0000 (10:34 +0900)
Change-Id: Ie8e53d07f5ed3acb14d0a42de38aee3fda7d9c1f
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
net/tap.c
tizen/src/ecs/ecs_msg_device.c
tizen/src/emul_state.c
tizen/src/emul_state.h
tizen/src/skin/maruskin_client.c
tizen/src/ui/menu/contextmenu.cpp
tizen/src/util/sdb.c

index a2c90c7c8f79fe79399764373d88d8c8ceb4505b..d5c245cf3e4df1b1188b96703781c6cdb03c052a 100644 (file)
--- a/net/tap.c
+++ b/net/tap.c
@@ -758,9 +758,6 @@ int net_init_tap(const NetClientOptions *opts, const char *name,
     tap = opts->tap;
     queues = tap->has_queues ? tap->queues : 1;
     vhostfdname = tap->has_vhostfd ? tap->vhostfd : NULL;
-#if defined(CONFIG_MARU)
-    set_emul_tap_enable(true);
-#endif
     /* QEMU vlans does not support multiqueue tap, in this case peer is set.
      * For -netdev, peer is always NULL. */
     if (peer && (tap->has_queues || tap->has_fds || tap->has_vhostfds)) {
index 8ebf2e0cc96e3d0f69fd97f753d38f8c213f352a..1bb46ed0a1b865aa78173bdaba1f275ce8e4c2be 100644 (file)
@@ -404,7 +404,7 @@ bool msgproc_device_req(ECS_Client* ccli, ECS__DeviceReq* msg)
         msgproc_device_req_sensor(ccli, msg, cmd);
     } else if (!strcmp(cmd, "Network")) {
         if (msg->action == MSG_ACT_NETBRIDGE) {
-            make_send_device_ntf(cmd, is_emul_tap_enable(), msg->action, NULL);
+            make_send_device_ntf(cmd, is_netclient_tap_attached(), msg->action, NULL);
         } else {
             LOG_SEVERE("unsupported action value: %d\n", msg->action);
         }
index 9b2d162927dd23c9bc6a23800b13c9c470d346a5..7e7c6ee9449b4ab49b640753b4229229a785c605 100644 (file)
@@ -179,17 +179,6 @@ bool is_emul_input_touch_enable(void)
     return _emul_info.input_touch_enable;
 }
 
-bool is_emul_tap_enable(void)
-{
-    return _emul_info.tap_enable;
-}
-
-void set_emul_tap_enable(bool enable)
-{
-    LOG_INFO("%s: %s\n", __func__, enable ? "true" : "false");
-    _emul_info.tap_enable = enable;
-}
-
 bool is_netclient_tap_attached(void)
 {
     NetClientState *ncs[MAX_QUEUE_NUM];
@@ -273,7 +262,7 @@ int get_emul_max_touch_point(void)
 void set_emul_vm_base_port(int port)
 {
     _emul_info.vm_base_port = port;
-    if (is_emul_tap_enable()) {
+    if (is_netclient_tap_attached()) {
         _emul_info.device_serial_number = 26101;
     } else {
         _emul_info.device_serial_number = port + 1;
index 76577610c617535fc5bae9b3cfe07e97613e7353..2b8927280f6ab6535ad7f8371c39d091a2f3fe6f 100644 (file)
@@ -102,7 +102,6 @@ typedef  struct EmulatorConfigInfo {
     char http_proxy_addr[MAX_ADDR_LEN];
     char http_proxy_port[MAX_PORT_LEN];
 
-    bool tap_enable;
     char guest_ip[16];
     char host_ip[16];
 
@@ -162,7 +161,6 @@ void set_emulator_condition(int state);
 void set_emul_rotation(short rotation_type);
 void set_emul_caps_lock_state(int state);
 void set_emul_num_lock_state(int state);
-void set_emul_tap_enable(bool enable);
 void set_emul_hds_attached(bool attached);
 void set_emul_hds_path(const char *path);
 void set_emul_hds_guest_path(const char *path);
@@ -200,7 +198,6 @@ int get_emul_caps_lock_state(void);
 int get_emul_num_lock_state(void);
 char* get_emul_guest_ip(void);
 char* get_emul_host_ip(void);
-bool is_emul_tap_enable(void);
 
 bool get_emul_hds_attached(void);
 char* get_emul_hds_path(void);
index 7b6f93af80d288eac84b0423c5369d68d67496f1..4f47ea353d1590637ecfc9cfd542d97e92cda3e9 100644 (file)
@@ -154,7 +154,7 @@ static void *run_skin_client(void *arg)
         }
         g_strfreev(proxy);
     }
-    gchar const* tap_enabled = g_strdup_printf("%s=%s", OPT_USE_TAP, is_emul_tap_enable() ? "true" : "false");
+    gchar const* tap_enabled = g_strdup_printf("%s=%s", OPT_USE_TAP, is_netclient_tap_attached() ? "true" : "false");
     int tap_opt_len = (int)strlen(tap_enabled);
 
 #ifdef CONFIG_WIN32
index 16d643b364585d7b9fbf3f06d540aecb30f393e9..6d5e099c1154c3e5060268425893984369c420f0 100644 (file)
@@ -502,7 +502,7 @@ void ContextMenu::slotShell()
 
     QString sdbPort = QString::number(get_device_serial_number());
     QString sdbSerialName;
-    if (is_emul_tap_enable()) {
+    if (is_netclient_tap_attached()) {
         sdbSerialName = QString(get_emul_guest_ip());
     } else {
         sdbSerialName = "emulator-" + sdbPort;
index 1b05b3d7c798127ed1bbcb9604c9320a09eb64b8..25f1bb381129d34bc30cbbff94b376e9b3517ff1 100644 (file)
@@ -197,7 +197,7 @@ void set_base_port(void)
 
 void sdb_setup(void)
 {
-    if (is_emul_tap_enable()) {
+    if (is_netclient_tap_attached()) {
         return;
     }