diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2011-12-10 12:27:32 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-12-10 12:27:32 +0200 |
commit | 59ecfcb3e5d2f9b04f6f4d5c9f4851395ba8591b (patch) | |
tree | 70d1e22e5d4c7f446942086172a9cf356dd6ace9 /src | |
parent | 87318d768c9bf6842ec4dc74f03220ee8b6a9c72 (diff) | |
download | connman-59ecfcb3e5d2f9b04f6f4d5c9f4851395ba8591b.tar.gz connman-59ecfcb3e5d2f9b04f6f4d5c9f4851395ba8591b.tar.bz2 connman-59ecfcb3e5d2f9b04f6f4d5c9f4851395ba8591b.zip |
manager: Remove support for ProvisionService method
Diffstat (limited to 'src')
-rw-r--r-- | src/connman.h | 1 | ||||
-rw-r--r-- | src/manager.c | 16 | ||||
-rw-r--r-- | src/service.c | 59 |
3 files changed, 0 insertions, 76 deletions
diff --git a/src/connman.h b/src/connman.h index 94e85aeb..5711d54d 100644 --- a/src/connman.h +++ b/src/connman.h @@ -488,7 +488,6 @@ int __connman_service_request_login(struct connman_service *service); int __connman_service_connect(struct connman_service *service); int __connman_service_disconnect(struct connman_service *service); int __connman_service_disconnect_all(void); -int __connman_service_provision(DBusMessage *msg); void __connman_service_auto_connect(void); void __connman_service_provision_changed(const char *ident); diff --git a/src/manager.c b/src/manager.c index 78821c79..528abcb7 100644 --- a/src/manager.c +++ b/src/manager.c @@ -337,20 +337,6 @@ static DBusMessage *get_services(DBusConnection *conn, return reply; } -static DBusMessage *provision_service(DBusConnection *conn, DBusMessage *msg, - void *data) -{ - int err; - - DBG("conn %p", conn); - - err = __connman_service_provision(msg); - if (err < 0) - return __connman_error_failed(msg, -err); - - return NULL; -} - static DBusMessage *connect_provider(DBusConnection *conn, DBusMessage *msg, void *data) { @@ -538,8 +524,6 @@ static GDBusMethodTable manager_methods[] = { { "DisableTechnology", "s", "", disable_technology, G_DBUS_METHOD_FLAG_ASYNC }, { "GetServices", "", "a(oa{sv})", get_services }, - { "ProvisionService", "s", "", provision_service, - G_DBUS_METHOD_FLAG_ASYNC }, { "ConnectProvider", "a{sv}", "o", connect_provider, G_DBUS_METHOD_FLAG_ASYNC }, { "RegisterAgent", "o", "", register_agent }, diff --git a/src/service.c b/src/service.c index 7390444a..fe4b51bc 100644 --- a/src/service.c +++ b/src/service.c @@ -4773,65 +4773,6 @@ void __connman_service_provision_changed(const char *ident) g_sequence_foreach(service_list, provision_changed, (void *)ident); } -int __connman_service_provision(DBusMessage *msg) -{ - GKeyFile *keyfile = NULL; - const char *config_str = NULL; - char *group = NULL, *ident = NULL; - int err = 0; - struct connman_service *service; - - DBG(""); - - dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &config_str, - DBUS_TYPE_INVALID); - - if (config_str == NULL || strlen(config_str) == 0) - return -EINVAL; - - keyfile = g_key_file_new(); - - /* populate GKeyFile with config_str */ - if (g_key_file_load_from_data(keyfile, config_str, - strlen(config_str), 0, NULL) == FALSE) { - err = -EINVAL; - goto done; - } - - /* - * read only one group of settings (only one service supported, no - * global settings) - */ - group = g_key_file_get_start_group(keyfile); - - if (group == NULL || g_str_has_prefix(group, "service_") == FALSE) { - err = -EINVAL; - goto done; - } - - err = __connman_config_load_service(keyfile, group, TRUE); - if (err < 0) - goto done; - - ident = group + strlen("service_"); - - /* trigger service provisioning if service exists */ - service = lookup_by_identifier(ident); - if (service != NULL) - __connman_config_provision_service(service); - - g_dbus_send_reply(connection, msg, DBUS_TYPE_INVALID); - -done: - if (group != NULL) - g_free(group); - - if (keyfile != NULL) - g_key_file_free(keyfile); - - return err; -} - /** * __connman_service_get: * @identifier: service identifier |