summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-05-13 22:12:38 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-05-13 22:12:38 -0700
commitb164eaf55a394a57329a6133659a2d7adcc2611d (patch)
tree68c4433459a648629fd782afc91764fa438b3a62
parentbe4f8242a9946a059d85cfa855edcb5d45d1811b (diff)
downloadconnman-b164eaf55a394a57329a6133659a2d7adcc2611d.tar.gz
connman-b164eaf55a394a57329a6133659a2d7adcc2611d.tar.bz2
connman-b164eaf55a394a57329a6133659a2d7adcc2611d.zip
Make some service function private for now
-rw-r--r--src/connman.h2
-rw-r--r--src/profile.c4
-rw-r--r--src/service.c26
3 files changed, 17 insertions, 15 deletions
diff --git a/src/connman.h b/src/connman.h
index b6c24c74..766058e4 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -229,6 +229,8 @@ void __connman_service_cleanup(void);
void __connman_service_list(DBusMessageIter *iter);
+void __connman_service_put(struct connman_service *service);
+
struct connman_service *__connman_service_lookup_from_device(struct connman_device *device);
struct connman_service *__connman_service_create_from_device(struct connman_device *device);
diff --git a/src/profile.c b/src/profile.c
index 729c7de2..8984872f 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -113,7 +113,7 @@ int __connman_profile_remove_device(struct connman_device *device)
if (service == NULL)
return -EINVAL;
- connman_service_put(service);
+ __connman_service_put(service);
return 0;
}
@@ -141,7 +141,7 @@ int __connman_profile_remove_network(struct connman_network *network)
if (service == NULL)
return -EINVAL;
- connman_service_put(service);
+ __connman_service_put(service);
return 0;
}
diff --git a/src/service.c b/src/service.c
index c3d4e201..e23a6510 100644
--- a/src/service.c
+++ b/src/service.c
@@ -491,12 +491,12 @@ static void service_free(gpointer data)
}
/**
- * connman_service_put:
+ * __connman_service_put:
* @service: service structure
*
* Release service if no longer needed
*/
-void connman_service_put(struct connman_service *service)
+void __connman_service_put(struct connman_service *service)
{
DBG("service %p", service);
@@ -570,7 +570,7 @@ struct connman_service *connman_service_ref(struct connman_service *service)
*/
void connman_service_unref(struct connman_service *service)
{
- connman_service_put(service);
+ __connman_service_put(service);
}
static gint service_compare(gconstpointer a, gconstpointer b,
@@ -717,12 +717,12 @@ int __connman_service_indicate_state(struct connman_service *service,
}
/**
- * connman_service_lookup:
+ * __connman_service_lookup:
* @identifier: service identifier
*
* Look up a service by identifier (reference count will not be increased)
*/
-struct connman_service *connman_service_lookup(const char *identifier)
+static struct connman_service *__connman_service_lookup(const char *identifier)
{
GSequenceIter *iter;
@@ -734,12 +734,12 @@ struct connman_service *connman_service_lookup(const char *identifier)
}
/**
- * connman_service_get:
+ * __connman_service_get:
* @identifier: service identifier
*
* Look up a service by identifier or create a new one if not found
*/
-struct connman_service *connman_service_get(const char *identifier)
+static struct connman_service *__connman_service_get(const char *identifier)
{
struct connman_service *service;
GSequenceIter *iter;
@@ -816,7 +816,7 @@ struct connman_service *__connman_service_lookup_from_device(struct connman_devi
name = g_strdup_printf("%s_%s",
__connman_device_get_type(device), ident);
- service = connman_service_lookup(name);
+ service = __connman_service_lookup(name);
g_free(name);
@@ -865,12 +865,12 @@ struct connman_service *__connman_service_create_from_device(struct connman_devi
name = g_strdup_printf("%s_%s",
__connman_device_get_type(device), ident);
- service = connman_service_get(name);
+ service = __connman_service_get(name);
if (service == NULL)
goto done;
if (service->path != NULL) {
- connman_service_put(service);
+ __connman_service_put(service);
service = NULL;
goto done;
}
@@ -910,7 +910,7 @@ struct connman_service *__connman_service_lookup_from_network(struct connman_net
name = g_strdup_printf("%s_%s_%s",
__connman_network_get_type(network), ident, group);
- service = connman_service_lookup(name);
+ service = __connman_service_lookup(name);
g_free(name);
@@ -1029,7 +1029,7 @@ struct connman_service *__connman_service_create_from_network(struct connman_net
name = g_strdup_printf("%s_%s_%s",
__connman_network_get_type(network), ident, group);
- service = connman_service_get(name);
+ service = __connman_service_get(name);
if (service == NULL)
goto done;
@@ -1038,7 +1038,7 @@ struct connman_service *__connman_service_create_from_network(struct connman_net
__connman_profile_changed();
- connman_service_put(service);
+ __connman_service_put(service);
service = NULL;
goto done;
}