From bb0c0c0ae3dc3b9b466bc63ee45b0b325c1bbe7c Mon Sep 17 00:00:00 2001 From: Danny Jeongseok Seo Date: Thu, 19 Jul 2012 13:30:06 +0900 Subject: [PATCH] Revise unncessary functions --- CMakeLists.txt | 2 +- debian/changelog | 8 ++++ debian/control | 2 +- include/dbus.h | 1 - packaging/net-config.spec | 2 +- resources/usr/etc/dbus-1/system.d/net-config.conf | 2 +- src/dbus.c | 45 ----------------------- src/wifi-background-scan.c | 4 +- src/wifi-power.c | 7 +--- 9 files changed, 16 insertions(+), 57 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f46cfc..44fc113 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,9 +17,9 @@ SET(SRCS src/emulator.c src/wifi-power.c src/wifi-state.c + src/network-state.c src/wifi-indicator.c src/signal-handler.c - src/network-state.c src/wifi-background-scan.c ) diff --git a/debian/changelog b/debian/changelog index 536e7cf..0d3241c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +net-config (0.1.80) unstable; urgency=low + + * Revise unnecessary funtions + * Git: slp/pkgs/n/net-config + * Tag: net-config_0.1.80 + + -- Danny Jeongseok Seo Wed, 09 May 2012 15:13:52 +0900 + net-config (0.1.79) unstable; urgency=low * Revise net-config signal filter handler diff --git a/debian/control b/debian/control index 2fd9bb9..79723ba 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: net-config Section: net Priority: extra Maintainer: Danny Jeongseok Seo -Uploaders: Danny Jeongseok Seo , Jeik Jaehyun Kim , Misun Kim , Sunkey Lee , Sanghoon Cho +Uploaders: Danny Jeongseok Seo , Jeik Jaehyun Kim , Misun Kim , Sanghoon Cho Build-Depends: debhelper (>= 5), libdbus-1-dev (>= 1.1.1), libglib2.0-dev, libdbus-glib-1-dev, dlog-dev, syspopup-caller-dev, libwifi-direct-dev Standards-Version: 3.7.2 diff --git a/include/dbus.h b/include/dbus.h index cf6a559..ee0aa02 100644 --- a/include/dbus.h +++ b/include/dbus.h @@ -60,7 +60,6 @@ struct dbus_input_arguments { }; char *netconfig_wifi_get_connected_service_name(DBusMessage *message); -int netconfig_extract_services_profile(DBusMessage *message, char **essid); DBusMessage *netconfig_invoke_dbus_method(const char *dest, DBusConnection *connection, const char *path, const char *interface_name, const char *method); DBusMessage *netconfig_supplicant_invoke_dbus_method(const char *dest, diff --git a/packaging/net-config.spec b/packaging/net-config.spec index 3c0b6ef..d4f883e 100644 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -2,7 +2,7 @@ Name: net-config Summary: TIZEN Network Configuration Module -Version: 0.1.79 +Version: 0.1.80 Release: 1 Group: System/Network License: Apache License Version 2.0 diff --git a/resources/usr/etc/dbus-1/system.d/net-config.conf b/resources/usr/etc/dbus-1/system.d/net-config.conf index 79af901..cb73052 100644 --- a/resources/usr/etc/dbus-1/system.d/net-config.conf +++ b/resources/usr/etc/dbus-1/system.d/net-config.conf @@ -19,4 +19,4 @@ - \ No newline at end of file + diff --git a/src/dbus.c b/src/dbus.c index 7055061..64b08d5 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -592,51 +592,6 @@ char *netconfig_wifi_get_connected_service_name(DBusMessage *message) return NULL; } -int netconfig_extract_services_profile(DBusMessage *message, char **profile) -{ - DBusMessageIter iter, array; - - dbus_message_iter_init(message, &iter); - dbus_message_iter_recurse(&iter, &array); - - while (dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_DICT_ENTRY) { - DBusMessageIter entry, array2, object_path; - const char *key = NULL; - const char *temp = NULL; - - dbus_message_iter_recurse(&array, &entry); - dbus_message_iter_get_basic(&entry, &key); - - if (strcmp(key, "Services") == 0) { - dbus_message_iter_next(&entry); - dbus_message_iter_recurse(&entry, &array2); - - if (dbus_message_iter_get_arg_type(&array2) == DBUS_TYPE_ARRAY) { - dbus_message_iter_recurse(&array2, &object_path); - - if (dbus_message_iter_get_arg_type(&object_path) - == DBUS_TYPE_OBJECT_PATH) { - dbus_message_iter_get_basic(&object_path, &temp); - - if (strstr(temp, "wifi_") != NULL) { - if (*profile != NULL) - return -1; - - *profile = malloc(sizeof(char)*128); - strcpy(*profile, temp); - - return 0; - } - } - } - } - - dbus_message_iter_next(&array); - } - - return -1; -} - void netconfig_dbus_parse_recursive(DBusMessageIter *iter, netconfig_dbus_result_type result_type, void *data) { diff --git a/src/wifi-background-scan.c b/src/wifi-background-scan.c index b40941c..d46e2e0 100644 --- a/src/wifi-background-scan.c +++ b/src/wifi-background-scan.c @@ -86,7 +86,7 @@ static gboolean __netconfig_wifi_bgscan_request_connman_scan(void) /** dbus-send --system --print-reply --dest=net.connman / net.connman.Manager.SetProperty string:ScanMode variant:uint16:0/1/2/3 */ char request[] = CONNMAN_MANAGER_INTERFACE ".RequestScan"; char param1[] = "string:wifi"; - char path[DBUS_PATH_MAX_BUFLEN] = "/"; + char path[] = CONNMAN_MANAGER_PATH; char *param_array[] = { NULL, NULL, @@ -109,7 +109,7 @@ static gboolean __netconfig_wifi_bgscan_request_connman_scan(void) reply = netconfig_dbus_send_request(CONNMAN_SERVICE, param_array); if (reply == NULL) { - ERR("Error!!! Request failed"); + ERR("Error! Request failed"); return FALSE; } diff --git a/src/wifi-power.c b/src/wifi-power.c index 993d6e1..74773e1 100644 --- a/src/wifi-power.c +++ b/src/wifi-power.c @@ -176,7 +176,7 @@ static gboolean __netconfig_wifi_enable_technology(void) reply = netconfig_dbus_send_request(CONNMAN_SERVICE, param_array); if (reply == NULL) { - ERR("Error!!! Request failed"); + ERR("Error! Request failed"); return FALSE; } @@ -205,7 +205,7 @@ static gboolean __netconfig_wifi_disable_technology(void) reply = netconfig_dbus_send_request(CONNMAN_SERVICE, param_array); if (reply == NULL) { - ERR("Error!!! Request failed"); + ERR("Error! Request failed"); return FALSE; } @@ -314,9 +314,6 @@ static gboolean __netconfig_wifi_try_to_load_driver(void) return FALSE; } - /* TODO: Do I need some time to activate new link for ConnMan? I don't think so */ - /* sleep(1); */ - for (count = 0; count < 3; count++) { __netconfig_wifi_enable_technology(); -- 2.7.4