From: SeokYeon Hwang Date: Sat, 30 May 2015 15:07:47 +0000 (+0900) Subject: emulator: remove legacy function for detecting tap netclient X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~398 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe8c35cd994f124fd6142c64b596786824572211;p=sdk%2Femulator%2Fqemu.git emulator: remove legacy function for detecting tap netclient Change-Id: Ie8e53d07f5ed3acb14d0a42de38aee3fda7d9c1f Signed-off-by: SeokYeon Hwang --- diff --git a/net/tap.c b/net/tap.c index a2c90c7c8f..d5c245cf3e 100644 --- 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)) { diff --git a/tizen/src/ecs/ecs_msg_device.c b/tizen/src/ecs/ecs_msg_device.c index 8ebf2e0cc9..1bb46ed0a1 100644 --- a/tizen/src/ecs/ecs_msg_device.c +++ b/tizen/src/ecs/ecs_msg_device.c @@ -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); } diff --git a/tizen/src/emul_state.c b/tizen/src/emul_state.c index 9b2d162927..7e7c6ee944 100644 --- a/tizen/src/emul_state.c +++ b/tizen/src/emul_state.c @@ -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; diff --git a/tizen/src/emul_state.h b/tizen/src/emul_state.h index 76577610c6..2b8927280f 100644 --- a/tizen/src/emul_state.h +++ b/tizen/src/emul_state.h @@ -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); diff --git a/tizen/src/skin/maruskin_client.c b/tizen/src/skin/maruskin_client.c index 7b6f93af80..4f47ea353d 100644 --- a/tizen/src/skin/maruskin_client.c +++ b/tizen/src/skin/maruskin_client.c @@ -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 diff --git a/tizen/src/ui/menu/contextmenu.cpp b/tizen/src/ui/menu/contextmenu.cpp index 16d643b364..6d5e099c11 100644 --- a/tizen/src/ui/menu/contextmenu.cpp +++ b/tizen/src/ui/menu/contextmenu.cpp @@ -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; diff --git a/tizen/src/util/sdb.c b/tizen/src/util/sdb.c index 1b05b3d7c7..25f1bb3811 100644 --- a/tizen/src/util/sdb.c +++ b/tizen/src/util/sdb.c @@ -197,7 +197,7 @@ void set_base_port(void) void sdb_setup(void) { - if (is_emul_tap_enable()) { + if (is_netclient_tap_attached()) { return; }