*
* Connection Manager
*
- * Copyright (C) 2007-2010 Intel Corporation. All rights reserved.
+ * Copyright (C) 2007-2012 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
#include <config.h>
#endif
+#include <errno.h>
+
#include <gdbus.h>
#include "connman.h"
DBG("owner %s path %s", counter->owner, counter->path);
- if (counter->watch > 0)
- g_dbus_remove_watch(connection, counter->watch);
-
__connman_rtnl_update_interval_remove(counter->interval);
__connman_service_counter_unregister(counter->path);
if (g_strcmp0(owner, counter->owner) != 0)
return -EACCES;
+ if (counter->watch > 0)
+ g_dbus_remove_watch(connection, counter->watch);
+
g_hash_table_remove(owner_mapping, counter->owner);
g_hash_table_remove(counter_table, counter->path);
DBG("owner %s path %s", counter->owner, counter->path);
+ if (counter->watch > 0)
+ g_dbus_remove_watch(connection, counter->watch);
+
message = dbus_message_new_method_call(counter->owner, counter->path,
CONNMAN_COUNTER_INTERFACE, "Release");
if (message == NULL)