wispr: Service does not need to be reference counted
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Thu, 13 Sep 2012 13:44:14 +0000 (16:44 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 28 Sep 2012 12:06:01 +0000 (15:06 +0300)
src/service.c
src/wispr.c

index 3e4c5bf..3417e89 100644 (file)
@@ -4185,6 +4185,7 @@ static void service_free(gpointer user_data)
        __connman_notifier_service_remove(service);
        service_schedule_removed(service);
 
+       __connman_wispr_stop(service);
        stats_stop(service);
 
        service->path = NULL;
index 1854c2d..879f906 100644 (file)
@@ -168,9 +168,6 @@ static void free_connman_wispr_portal_context(struct connman_wispr_portal_contex
                        wp_context->wispr_portal->ipv6_context = NULL;
        }
 
-       if (wp_context->service != NULL)
-               connman_service_unref(wp_context->service);
-
        if (wp_context->token > 0)
                connman_proxy_lookup_cancel(wp_context->token);
 
@@ -929,8 +926,6 @@ int __connman_wispr_start(struct connman_service *service,
        if (wp_context == NULL)
                return -ENOMEM;
 
-       connman_service_ref(service);
-
        wp_context->service = service;
        wp_context->type = type;
        wp_context->wispr_portal = wispr_portal;