summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaesoo Jun <steve.jun@samsung.com>2016-12-01 08:48:56 (GMT)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2016-12-01 08:48:56 (GMT)
commit4000e9e89098cfadfc376c7d230b32eccc00bdf4 (patch)
tree25ccdac50cff11c0030aa748a2e6426f957d2c14
parent18975851482e3398b2c93ff36c6461794d932df1 (diff)
parent0be2d60f213ba54b51a1111e6fdd4cace35b6103 (diff)
downloadconnman-4000e9e89098cfadfc376c7d230b32eccc00bdf4.zip
connman-4000e9e89098cfadfc376c7d230b32eccc00bdf4.tar.gz
connman-4000e9e89098cfadfc376c7d230b32eccc00bdf4.tar.bz2
-rwxr-xr-xpackaging/connman.spec4
-rwxr-xr-xplugins/wifi.c5
-rwxr-xr-xsrc/service.c72
-rwxr-xr-xsrc/technology.c15
4 files changed, 60 insertions, 36 deletions
diff --git a/packaging/connman.spec b/packaging/connman.spec
index b37b135..6a24f31 100755
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -142,6 +142,10 @@ mkdir -p %{buildroot}%{_unitdir}
%if "%{profile}" == "tv"
cp src/connman_tv.service %{buildroot}%{_libdir}/systemd/system/connman.service
+%if "%{?_lib}" == "lib64"
+cp src/connman_tv.service %{buildroot}%{_unitdir}/connman.service
+cp vpn/connman-vpn.service %{buildroot}%{_unitdir}/connman-vpn.service
+%endif
%else
%if "%{?_lib}" == "lib64"
cp src/connman.service %{buildroot}%{_unitdir}/connman.service
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 05eb47e..c0079b3 100755
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2990,7 +2990,12 @@ static void network_added(GSupplicantNetwork *supplicant_network)
#endif
if (wifi->hidden && ssid) {
+#if defined TIZEN_EXT
+ if (network_security(wifi->hidden->security) ==
+ network_security(security) &&
+#else
if (!g_strcmp0(wifi->hidden->security, security) &&
+#endif
wifi->hidden->ssid_len == ssid_len &&
!memcmp(wifi->hidden->ssid, ssid, ssid_len)) {
connman_network_connect_hidden(network,
diff --git a/src/service.c b/src/service.c
index 1eae380..34a37a7 100755
--- a/src/service.c
+++ b/src/service.c
@@ -4085,8 +4085,10 @@ static void set_error(struct connman_service *service,
if (!service->path)
return;
+#if !defined TIZEN_EXT
if (!allow_property_changed(service))
return;
+#endif
str = error2string(service->error);
@@ -4619,8 +4621,12 @@ static DBusMessage *connect_service(DBusConnection *conn,
DBusMessage *msg, void *user_data)
{
struct connman_service *service = user_data;
+#if defined TIZEN_EXT
+ int err = 0;
+#else
int index, err = 0;
GList *list;
+#endif
DBG("service %p", service);
@@ -4660,6 +4666,7 @@ static DBusMessage *connect_service(DBusConnection *conn,
}
}
+#if !defined TIZEN_EXT
index = __connman_service_get_index(service);
for (list = service_list; list; list = list->next) {
@@ -4685,6 +4692,7 @@ static DBusMessage *connect_service(DBusConnection *conn,
}
if (err == -EINPROGRESS)
return __connman_error_operation_timeout(msg);
+#endif
service->ignore = false;
@@ -6002,34 +6010,6 @@ static int check_wpspin(struct connman_service *service, const char *wpspin)
return 0;
}
-#if defined TIZEN_EXT
-static int __connman_service_connect_hidden(struct connman_service *service,
- const char *name, int name_len,
- const char *identity, const char *passphrase, void *user_data)
-{
- GList *list;
-
- for (list = service_list; list; list = list->next) {
- struct connman_service *target = list->data;
- const char *target_ssid = NULL;
- unsigned int target_ssid_len = 0;
-
- if (service->network != NULL &&
- service->security == target->security) {
- target_ssid = connman_network_get_blob(service->network,
- "WiFi.SSID", &target_ssid_len);
- if (target_ssid_len == name_len &&
- memcmp(target_ssid, name, name_len) == 0) {
- return connman_network_connect_hidden(service->network,
- (char *)identity, (char *)passphrase, user_data);
- }
- }
- }
-
- return -ENOENT;
-}
-#endif
-
static void request_input_cb(struct connman_service *service,
bool values_received,
const char *name, int name_len,
@@ -6062,14 +6042,6 @@ static void request_input_cb(struct connman_service *service,
}
if (service->hidden && name_len > 0 && name_len <= 32) {
-#if defined TIZEN_EXT
- /* TIZEN already has Wi-Fi hidden scan before this hidden connection */
- err = __connman_service_connect_hidden(service, name, name_len,
- identity, passphrase, user_data);
- if (err == 0 || err == -EALREADY || err == -EINPROGRESS)
- return;
-#endif
-
device = connman_network_get_device(service->network);
security = connman_network_get_string(service->network,
"WiFi.Security");
@@ -6563,6 +6535,7 @@ static int service_indicate_state(struct connman_service *service)
#if defined TIZEN_EXT
if (service->type == CONNMAN_SERVICE_TYPE_WIFI)
service->order = 5;
+ __connman_service_auto_connect(CONNMAN_SERVICE_CONNECT_REASON_AUTO);
#endif
if (service->connect_reason == CONNMAN_SERVICE_CONNECT_REASON_USER &&
connman_agent_report_error(service, service->path,
@@ -7065,6 +7038,33 @@ static int service_connect(struct connman_service *service)
if (service->hidden)
return -EPERM;
+#if defined TIZEN_EXT
+ GList *list;
+ int index;
+
+ index = __connman_service_get_index(service);
+
+ for (list = service_list; list; list = list->next) {
+ struct connman_service *temp = list->data;
+
+ if (service->type == CONNMAN_SERVICE_TYPE_CELLULAR)
+ break;
+
+ if (!is_connecting(temp) && !is_connected(temp))
+ break;
+
+ if (service == temp)
+ continue;
+
+ if (service->type != temp->type)
+ continue;
+
+ if (__connman_service_get_index(temp) == index &&
+ __connman_service_disconnect(temp) == -EINPROGRESS)
+ return -EINPROGRESS;
+ }
+#endif
+
switch (service->type) {
case CONNMAN_SERVICE_TYPE_UNKNOWN:
case CONNMAN_SERVICE_TYPE_SYSTEM:
diff --git a/src/technology.c b/src/technology.c
index 9e00a29..d5d4a40 100755
--- a/src/technology.c
+++ b/src/technology.c
@@ -1063,8 +1063,23 @@ void __connman_technology_scan_stopped(struct connman_device *device,
count += 1;
}
+#if defined TIZEN_EXT
+ if (count == 0) {
+ DBusMessage *signal;
+
+ signal = dbus_message_new_signal(CONNMAN_MANAGER_PATH,
+ CONNMAN_MANAGER_INTERFACE, "ScanDone");
+ if (!signal)
+ return;
+
+ dbus_connection_send(connection, signal, NULL);
+ dbus_message_unref(signal);
+ reply_scan_pending(technology, 0);
+ }
+#else
if (count == 0)
reply_scan_pending(technology, 0);
+#endif
}
void __connman_technology_notify_regdom_by_device(struct connman_device *device,