diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2012-01-20 12:01:48 +0200 |
---|---|---|
committer | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-01-24 11:48:06 +0100 |
commit | a04886ea66b5d691c3bb65457a20028c868b359c (patch) | |
tree | fbf231d08d3a83f9e140bf9699871a47abb99f4d /include | |
parent | 733d96f45e3ee0bcf9972079d803a266fdf9f725 (diff) | |
download | connman-a04886ea66b5d691c3bb65457a20028c868b359c.tar.gz connman-a04886ea66b5d691c3bb65457a20028c868b359c.tar.bz2 connman-a04886ea66b5d691c3bb65457a20028c868b359c.zip |
device: Add caller information to ref/unref debug prints.
Diffstat (limited to 'include')
-rw-r--r-- | include/device.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/device.h b/include/device.h index c1abe89a..54beb65d 100644 --- a/include/device.h +++ b/include/device.h @@ -55,8 +55,18 @@ struct connman_device; struct connman_device *connman_device_create(const char *node, enum connman_device_type type); -struct connman_device *connman_device_ref(struct connman_device *device); -void connman_device_unref(struct connman_device *device); + +#define connman_device_ref(device) \ + connman_device_ref_debug(device, __FILE__, __LINE__, __func__) + +#define connman_device_unref(device) \ + connman_device_unref_debug(device, __FILE__, __LINE__, __func__) + +struct connman_device * +connman_device_ref_debug(struct connman_device *device, + const char *file, int line, const char *caller); +void connman_device_unref_debug(struct connman_device *device, + const char *file, int line, const char *caller); enum connman_device_type connman_device_get_type(struct connman_device *device); void connman_device_set_index(struct connman_device *device, int index); |