diff options
author | Niraj Kumar Goit <niraj.g@samsung.com> | 2017-09-08 18:57:21 +0530 |
---|---|---|
committer | taesub kim <taesub.kim@samsung.com> | 2017-09-13 08:55:26 +0900 |
commit | 974ea0024e6000dc3aa9c51aa32b66f216ec2314 (patch) | |
tree | 1fcfd9c91d11e5f69e158c35106a5e8422650114 | |
parent | addabb554db07fd54d47886b36bb27c612825170 (diff) | |
download | connman-accepted/tizen/4.0/unified/20170914.175556.tar.gz connman-accepted/tizen/4.0/unified/20170914.175556.tar.bz2 connman-accepted/tizen/4.0/unified/20170914.175556.zip |
Send Error code only to requesting application.submit/tizen_4.0/20170913.025326accepted/tizen/4.0/unified/20170914.175556
Description: If an application request for wifi scan
and it gets failed, then send error code only to the
requesting application.
Change-Id: I90bc3b0af68e9d3ff5c2e4709f5788c1f107a854
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
-rwxr-xr-x | src/technology.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/technology.c b/src/technology.c index 94b99eab..a8da19b2 100755 --- a/src/technology.c +++ b/src/technology.c @@ -1179,18 +1179,27 @@ static DBusMessage *scan(DBusConnection *conn, DBusMessage *msg, void *data) dbus_message_get_sender(msg)); dbus_message_ref(msg); +#if !defined TIZEN_EXT technology->scan_pending = g_slist_prepend(technology->scan_pending, msg); +#endif err = __connman_device_request_scan(technology->type); +#if defined TIZEN_EXT + if (err < 0) + return __connman_error_failed(msg, -err); +#else if (err < 0) reply_scan_pending(technology, err); +#endif #if defined TIZEN_EXT if (err == 0) { g_scan_type = CONNMAN_SCAN_TYPE_FULL_CHANNEL; DBG("g_scan_type %d", g_scan_type); } + technology->scan_pending = + g_slist_prepend(technology->scan_pending, msg); #endif return NULL; } @@ -1256,12 +1265,10 @@ static DBusMessage *specific_scan(DBusConnection *conn, DBusMessage *msg, void * } dbus_message_ref(msg); - technology->scan_pending = - g_slist_prepend(technology->scan_pending, msg); err = __connman_device_request_specific_scan(technology->type, scan_type, specific_scan_list); if (err < 0) - reply_scan_pending(technology, err); + return __connman_error_failed(msg, -err); if (err == 0) { guint list_size = g_slist_length(specific_scan_list); @@ -1271,6 +1278,8 @@ static DBusMessage *specific_scan(DBusConnection *conn, DBusMessage *msg, void * g_scan_type = CONNMAN_SCAN_TYPE_MULTI_AP; DBG("list_size %u g_scan_type %d", list_size, g_scan_type); } + technology->scan_pending = + g_slist_prepend(technology->scan_pending, msg); if (scan_type == 1) { g_slist_free_full(specific_scan_list, g_free); |