summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2012-09-13 16:44:12 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-09-28 15:04:25 +0300
commite35e1cf8c7d5be8c04ff21760568e80055b68d24 (patch)
tree8a9d78acb1ee6294f46d18c62bf7b31538201a55
parenta037c503e573cc45f83164abf8f7af8a02c9bd3e (diff)
downloadconnman-e35e1cf8c7d5be8c04ff21760568e80055b68d24.tar.gz
connman-e35e1cf8c7d5be8c04ff21760568e80055b68d24.tar.bz2
connman-e35e1cf8c7d5be8c04ff21760568e80055b68d24.zip
wispr: Remove service usage reset function
Remove reset_service_usage() as it is now obsolete with the refcount always being equal to one.
-rw-r--r--src/wispr.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/wispr.c b/src/wispr.c
index 376be3dc..4001ba0d 100644
--- a/src/wispr.c
+++ b/src/wispr.c
@@ -229,22 +229,6 @@ static struct connman_wispr_portal_context *create_wispr_portal_context(void)
return wp_context;
}
-/**
- * This function is usued only by free_connman_wispr_portal, context pointer
- * might still be owned by a third party (gweb, agent dbus call...)
- * so we don't want service to be referenced in any context when it is not
- * valid anymore.
- */
-static void
-reset_service_usage(struct connman_wispr_portal_context *wp_context)
-{
- if (wp_context->service == NULL)
- return;
-
- connman_service_unref(wp_context->service);
- wp_context->service = NULL;
-}
-
static void free_connman_wispr_portal(gpointer data)
{
struct connman_wispr_portal *wispr_portal = data;
@@ -254,15 +238,11 @@ static void free_connman_wispr_portal(gpointer data)
if (wispr_portal == NULL)
return;
- if (wispr_portal->ipv4_context != NULL) {
- reset_service_usage(wispr_portal->ipv4_context);
+ if (wispr_portal->ipv4_context != NULL)
wispr_portal_context_unref(wispr_portal->ipv4_context);
- }
- if (wispr_portal->ipv6_context != NULL) {
- reset_service_usage(wispr_portal->ipv6_context);
+ if (wispr_portal->ipv6_context != NULL)
wispr_portal_context_unref(wispr_portal->ipv6_context);
- }
g_free(wispr_portal);
}