"Tethering.Identifier",
technology->tethering_ident);
- if (technology->tethering_passphrase)
+ if (technology->tethering_passphrase) {
+ char *enc = g_strescape(technology->tethering_passphrase, NULL);
g_key_file_set_string(keyfile, identifier,
- "Tethering.Passphrase",
- technology->tethering_passphrase);
+ "Tethering.Passphrase", enc);
+ g_free(enc);
+ }
#ifdef TIZEN_EXT
if (technology->type == CONNMAN_SERVICE_TYPE_WIFI) {
gchar *identifier;
GError *error = NULL;
bool enable, need_saving = false;
+#ifdef TIZEN_EXT
+ char *enc = NULL;
+#else
+ char *enc;
+#endif
DBG("technology %p", technology);
technology->tethering_ident = g_key_file_get_string(keyfile,
identifier, "Tethering.Identifier", NULL);
- technology->tethering_passphrase = g_key_file_get_string(keyfile,
+ enc = g_key_file_get_string(keyfile,
identifier, "Tethering.Passphrase", NULL);
-
+ if (enc)
+ technology->tethering_passphrase = g_strcompress(enc);
#ifdef TIZEN_EXT
if (technology->type == CONNMAN_SERVICE_TYPE_WIFI) {
unsigned int val = 0;
done:
g_free(identifier);
+#ifdef TIZEN_EXT
+ g_free(enc);
+#endif
g_key_file_free(keyfile);
}
DBUS_TYPE_STRING,
&technology->tethering_passphrase);
+#if defined TIZEN_EXT
connman_dbus_dict_append_basic(&dict, "MacPolicy",
DBUS_TYPE_UINT32,
&(technology->mac_policy));
connman_dbus_dict_append_basic(&dict, "RandomMacLifetime",
DBUS_TYPE_UINT32,
&(technology->random_mac_lifetime));
-#if defined TIZEN_EXT
+
if (technology->type == CONNMAN_SERVICE_TYPE_WIFI)
connman_dbus_dict_append_dict(&dict, "Device.List",
append_devices, technology);
+ if (technology->regdom)
+ connman_dbus_dict_append_basic(&dict, "CountryCode",
+ DBUS_TYPE_STRING,
+ &technology->regdom);
#endif
connman_dbus_dict_close(iter, &dict);
}
DBG("Successfuly sent DeviceDetected signal");
}
+
+void __connman_technology_notify_roaming_state(const char *ifname,
+ const char *state, const char *cur_bssid, const char *dst_bssid)
+{
+ DBG("");
+ DBusMessage *signal;
+ DBusMessageIter array, dict;
+
+ signal = dbus_message_new_signal(CONNMAN_MANAGER_PATH,
+ CONNMAN_MANAGER_INTERFACE, "RoamingStateChanged");
+ if (!signal)
+ return;
+
+ dbus_message_iter_init_append(signal, &array);
+
+ connman_dbus_dict_open(&array, &dict);
+
+ if (ifname)
+ connman_dbus_dict_append_basic(&dict, "Interface",
+ DBUS_TYPE_STRING, &ifname);
+ if (state)
+ connman_dbus_dict_append_basic(&dict, "State",
+ DBUS_TYPE_STRING, &state);
+ if (cur_bssid)
+ connman_dbus_dict_append_basic(&dict, "ConnectedBSSID",
+ DBUS_TYPE_STRING, &cur_bssid);
+ if (dst_bssid)
+ connman_dbus_dict_append_basic(&dict, "TargetBSSID",
+ DBUS_TYPE_STRING, &dst_bssid);
+
+ connman_dbus_dict_close(&array, &dict);
+
+ dbus_connection_send(connection, signal, NULL);
+ dbus_message_unref(signal);
+
+ DBG("Successfully sent Roaming State Changed signal");
+}
#endif
void __connman_technology_scan_started(struct connman_device *device)
enum connman_service_type type;
type = __connman_device_get_service_type(device);
+
+ if (type != CONNMAN_SERVICE_TYPE_WIFI)
+ return;
+
technology = technology_get(type);
if (!technology)
return;
+ if (!g_slist_find(technology->device_list, device))
+ return;
+
GKeyFile *keyfile;
gchar *identifier;
const char *name = get_name(technology->type);
gchar **ifname_list = NULL;
guint dev_count = g_slist_length(technology->device_list);
- if (dev_count > 1) {
+ if (dev_count >= 1) {
GString *ifname_str = g_string_new(NULL);
if (ifname_str) {
#if defined TIZEN_EXT
bool found = true;
int err = 0;
- if (technology->enabled_devices) {
+ if (technology->enabled_devices && type == CONNMAN_SERVICE_TYPE_WIFI) {
int i = 0;
found = false;
const char *ifname = connman_device_get_string(device, "Interface");
device);
#if defined TIZEN_EXT
+ technology_save_device(device);
+
const char *ifname = connman_device_get_string(device, "Interface");
__connman_technology_notify_device_detected(technology, ifname, true);
device);
#if defined TIZEN_EXT
+ technology_save_device(device);
+
const char *ifname = connman_device_get_string(device, "Interface");
__connman_technology_notify_device_detected(technology, ifname, false);
#endif