summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2016-06-14 18:41:01 +0530
committerNiraj Kumar Goit <niraj.g@samsung.com>2016-06-14 18:41:01 +0530
commit253b6ed5b7e248477262bd65a9b5b0d7c8e7dcab (patch)
treec0557fd32768a03bf61c82bcf927e3a358c274bb /src
parent2ba57348d65eea4956b9cf13c2fcce0292944e80 (diff)
downloadconnman-253b6ed5b7e248477262bd65a9b5b0d7c8e7dcab.tar.gz
connman-253b6ed5b7e248477262bd65a9b5b0d7c8e7dcab.tar.bz2
connman-253b6ed5b7e248477262bd65a9b5b0d7c8e7dcab.zip
[SPIN] set priority for connected service.
Change-Id: If32af57fef608cb7fb8a69d2c8ceacc88a86ce98 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/service.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/service.c b/src/service.c
index 3f842878..cb5122ca 100755
--- a/src/service.c
+++ b/src/service.c
@@ -6320,6 +6320,23 @@ static void single_connected_tech(struct connman_service *allowed)
g_slist_free(services);
}
+#if defined TIZEN_EXT
+static void set_priority_connected_service(void)
+{
+ struct connman_service *service;
+ GList *list;
+
+ for (list = service_list; list; list = list->next) {
+ service = list->data;
+
+ if (is_connected(service) == FALSE)
+ service->order = 5;
+ else
+ service->order = 6;
+ }
+}
+#endif
+
static const char *get_dbus_sender(struct connman_service *service)
{
if (!service->pending)
@@ -6463,6 +6480,11 @@ static int service_indicate_state(struct connman_service *service)
else if (service->type != CONNMAN_SERVICE_TYPE_VPN)
vpn_auto_connect();
+#if defined TIZEN_EXT
+ if (service->type == CONNMAN_SERVICE_TYPE_WIFI)
+ set_priority_connected_service();
+#endif
+
break;
case CONNMAN_SERVICE_STATE_ONLINE:
@@ -6514,7 +6536,10 @@ static int service_indicate_state(struct connman_service *service)
break;
case CONNMAN_SERVICE_STATE_FAILURE:
-
+#if defined TIZEN_EXT
+ if (service->type == CONNMAN_SERVICE_TYPE_WIFI)
+ service->order = 5;
+#endif
if (service->connect_reason == CONNMAN_SERVICE_CONNECT_REASON_USER &&
connman_agent_report_error(service, service->path,
error2string(service->error),