diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-02-26 23:45:29 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-02-26 23:45:29 +0100 |
commit | 72ed7e7dd6a3b944c7edc35c407b719aa679fbca (patch) | |
tree | 46b7bb0885e7283e981a97f891fa9e9f70efec2e /plugins | |
parent | fa7a1adf087f2dec6cbea91dac2e1c63a1c9cb52 (diff) | |
download | connman-72ed7e7dd6a3b944c7edc35c407b719aa679fbca.tar.gz connman-72ed7e7dd6a3b944c7edc35c407b719aa679fbca.tar.bz2 connman-72ed7e7dd6a3b944c7edc35c407b719aa679fbca.zip |
Convert identifier on-demand if needed
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/supplicant.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/plugins/supplicant.c b/plugins/supplicant.c index f9af81ae..b5c96992 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -845,9 +845,8 @@ static void properties_reply(DBusPendingCall *call, void *user_data) struct connman_network *network; DBusMessage *reply; DBusMessageIter array, dict; - char *security, *temp = NULL; + char *security; unsigned char strength; - unsigned int i; DBG("task %p", task); @@ -922,17 +921,6 @@ static void properties_reply(DBusPendingCall *call, void *user_data) if (result.identifier[0] == '\0') goto done; - temp = g_strdup(result.identifier); - if (temp == NULL) - goto done; - - for (i = 0; i < strlen(temp); i++) { - char tmp = temp[i]; - if ((tmp < '0' || tmp > '9') && (tmp < 'A' || tmp > 'Z') && - (tmp < 'a' || tmp > 'z')) - temp[i] = '_'; - } - strength = result.quality; if (result.has_rsn == TRUE) @@ -944,12 +932,12 @@ static void properties_reply(DBusPendingCall *call, void *user_data) else security = "none"; - network = connman_device_get_network(task->device, temp); + network = connman_device_get_network(task->device, result.identifier); if (network == NULL) { const char *mode; int index; - network = connman_network_create(temp, + network = connman_network_create(result.identifier, CONNMAN_NETWORK_TYPE_WIFI); if (network == NULL) goto done; @@ -985,7 +973,6 @@ static void properties_reply(DBusPendingCall *call, void *user_data) done: g_free(result.identifier); g_free(result.ssid); - g_free(temp); dbus_message_unref(reply); |