From: Samuel Ortiz Date: Mon, 4 Apr 2011 19:14:07 +0000 (+0200) Subject: profile: Remove useless wrappers X-Git-Tag: 0.73~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a14f9066f098cd80ef22899007cb6222d6bc8bf0;p=platform%2Fupstream%2Fconnman.git profile: Remove useless wrappers --- diff --git a/src/connman.h b/src/connman.h index 76b816b..fa7e4c3 100644 --- a/src/connman.h +++ b/src/connman.h @@ -436,13 +436,6 @@ int __connman_profile_remove(const char *path); void __connman_profile_changed(gboolean delayed); -int __connman_profile_add_device(struct connman_device *device); -int __connman_profile_remove_device(struct connman_device *device); - -int __connman_profile_add_network(struct connman_network *network); -int __connman_profile_update_network(struct connman_network *network); -int __connman_profile_remove_network(struct connman_network *network); - int __connman_tethering_init(void); void __connman_tethering_cleanup(void); diff --git a/src/network.c b/src/network.c index f3282dc..e7ae5d6 100644 --- a/src/network.c +++ b/src/network.c @@ -381,12 +381,12 @@ void connman_network_set_group(struct connman_network *network, if (g_strcmp0(network->group, group) == 0) { if (group != NULL) - __connman_profile_update_network(network); + __connman_service_update_from_network(network); return; } if (network->group != NULL) { - __connman_profile_remove_network(network); + __connman_service_remove_from_network(network); g_free(network->group); } @@ -394,7 +394,7 @@ void connman_network_set_group(struct connman_network *network, network->group = g_strdup(group); if (network->group != NULL) - __connman_profile_add_network(network); + __connman_service_create_from_network(network); } /** @@ -1733,9 +1733,9 @@ static int network_probe(struct connman_element *element) case CONNMAN_NETWORK_TYPE_CELLULAR: case CONNMAN_NETWORK_TYPE_WIFI: case CONNMAN_NETWORK_TYPE_WIMAX: - if (network->group != NULL) - __connman_profile_add_network(network); - break; + if (network->group != NULL && + __connman_service_create_from_network(network) == NULL) + return -EINVAL; } return 0; @@ -1764,7 +1764,7 @@ static void network_remove(struct connman_element *element) case CONNMAN_NETWORK_TYPE_WIFI: case CONNMAN_NETWORK_TYPE_WIMAX: if (network->group != NULL) { - __connman_profile_remove_network(network); + __connman_service_remove_from_network(network); g_free(network->group); network->group = NULL; diff --git a/src/profile.c b/src/profile.c index e6a397b..e0d9994 100644 --- a/src/profile.c +++ b/src/profile.c @@ -192,37 +192,6 @@ void __connman_profile_changed(gboolean delayed) changed_timeout = g_timeout_add_seconds(1, services_changed, NULL); } -int __connman_profile_add_network(struct connman_network *network) -{ - struct connman_service *service; - - DBG("network %p", network); - - service = __connman_service_create_from_network(network); - if (service == NULL) - return -EINVAL; - - return 0; -} - -int __connman_profile_update_network(struct connman_network *network) -{ - DBG("network %p", network); - - __connman_service_update_from_network(network); - - return 0; -} - -int __connman_profile_remove_network(struct connman_network *network) -{ - DBG("network %p", network); - - __connman_service_remove_from_network(network); - - return 0; -} - static DBusMessage *get_properties(DBusConnection *conn, DBusMessage *msg, void *data) {