diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-09-29 19:19:14 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-09-29 19:19:14 +0200 |
commit | e38df594b79345a08433d79291380187bc007b19 (patch) | |
tree | 4e4084cdecb1dfb4f46c7049cabbc36dc3d3ce6a /src/service.c | |
parent | 48e032dca7031a316088a26643dd49a87fce7879 (diff) | |
download | connman-e38df594b79345a08433d79291380187bc007b19.tar.gz connman-e38df594b79345a08433d79291380187bc007b19.tar.bz2 connman-e38df594b79345a08433d79291380187bc007b19.zip |
Export __connman_service_set_passphrase() to ConnMan core
Diffstat (limited to 'src/service.c')
-rw-r--r-- | src/service.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/service.c b/src/service.c index 2db12b91..6a2b19de 100644 --- a/src/service.c +++ b/src/service.c @@ -1423,9 +1423,12 @@ const char *connman_service_get_proxy_autoconfig(struct connman_service *service return __connman_ipconfig_get_proxy_autoconfig(service->ipconfig); } -static void connman_service_set_passphrase(struct connman_service *service, +void __connman_service_set_passphrase(struct connman_service *service, const char* passphrase) { + if (service->immutable == TRUE) + return; + g_free(service->passphrase); service->passphrase = g_strdup(passphrase); @@ -1510,7 +1513,7 @@ static DBusMessage *set_property(DBusConnection *conn, dbus_message_iter_get_basic(&value, &passphrase); - connman_service_set_passphrase(service, passphrase); + __connman_service_set_passphrase(service, passphrase); } else if (g_str_equal(name, "APN") == TRUE) { const char *apn; @@ -1929,7 +1932,7 @@ static void request_input_cb (struct connman_service *service, if (passphrase == NULL) return; - connman_service_set_passphrase(service, passphrase); + __connman_service_set_passphrase(service, passphrase); __connman_service_connect(service); } |