summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaesub kim <taesub.kim@samsung.com>2017-09-12 23:51:00 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2017-09-12 23:51:00 +0000
commit4478480d3fddc6b39cfdc0b8cae49c2849cce59e (patch)
tree1fcfd9c91d11e5f69e158c35106a5e8422650114
parentc53422c6df191108fa6f13f2724ba6afdc3960f6 (diff)
parent98145137772b04ce4e8ca140ee8ac217e7064933 (diff)
downloadconnman-4478480d3fddc6b39cfdc0b8cae49c2849cce59e.tar.gz
connman-4478480d3fddc6b39cfdc0b8cae49c2849cce59e.tar.bz2
connman-4478480d3fddc6b39cfdc0b8cae49c2849cce59e.zip
Merge "Send Error code only to requesting application." into tizensubmit/tizen/20170913.024954accepted/tizen/unified/20170914.065431
-rwxr-xr-xsrc/technology.c15
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);