summaryrefslogtreecommitdiff
path: root/include/network.h
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-01-20 12:01:49 +0200
committerDaniel Wagner <daniel.wagner@bmw-carit.de>2012-01-24 11:48:07 +0100
commitd9eb2d0c1032c34854528fca9d910d978c454997 (patch)
treee3486af484273fe60ff6ad7710a358697d71db03 /include/network.h
parenta04886ea66b5d691c3bb65457a20028c868b359c (diff)
downloadconnman-d9eb2d0c1032c34854528fca9d910d978c454997.tar.gz
connman-d9eb2d0c1032c34854528fca9d910d978c454997.tar.bz2
connman-d9eb2d0c1032c34854528fca9d910d978c454997.zip
network: Add caller information to ref/unref debug prints.
Diffstat (limited to 'include/network.h')
-rw-r--r--include/network.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/network.h b/include/network.h
index bb61f2d6..91154c8d 100644
--- a/include/network.h
+++ b/include/network.h
@@ -64,8 +64,18 @@ struct connman_network;
struct connman_network *connman_network_create(const char *identifier,
enum connman_network_type type);
-struct connman_network *connman_network_ref(struct connman_network *network);
-void connman_network_unref(struct connman_network *network);
+
+#define connman_network_ref(network) \
+ connman_network_ref_debug(network, __FILE__, __LINE__, __func__)
+
+#define connman_network_unref(network) \
+ connman_network_unref_debug(network, __FILE__, __LINE__, __func__)
+
+struct connman_network *
+connman_network_ref_debug(struct connman_network *network,
+ const char *file, int line, const char *caller);
+void connman_network_unref_debug(struct connman_network *network,
+ const char *file, int line, const char *caller);
enum connman_network_type connman_network_get_type(struct connman_network *network);
const char *connman_network_get_identifier(struct connman_network *network);