diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-11-10 17:22:19 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-11-10 17:57:09 +0100 |
commit | 9160b8abb1157186ce496cfaf2dfdf7018e49c62 (patch) | |
tree | 152b39262274b95e9fad320c164d0adf97b186cb | |
parent | 92b48e68d800117393948414460b1d147f9de864 (diff) | |
download | neard-9160b8abb1157186ce496cfaf2dfdf7018e49c62.tar.gz neard-9160b8abb1157186ce496cfaf2dfdf7018e49c62.tar.bz2 neard-9160b8abb1157186ce496cfaf2dfdf7018e49c62.zip |
tag: Unregister Record before Tag
When a Tag is leaving the field, it makes more sense to
unregister its associated records before the Device itself, and not the
other way around.
-rw-r--r-- | src/tag.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -645,12 +645,6 @@ void __near_tag_remove(struct near_tag *tag) DBG("path %s", tag->path); - if (!g_hash_table_lookup(tag_hash, tag->path)) - return; - - g_dbus_unregister_interface(connection, tag->path, - NFC_TAG_INTERFACE); - g_hash_table_remove(tag_hash, path); } @@ -1047,6 +1041,9 @@ static void free_tag(gpointer data) near_ndef_records_free(tag->records); + g_dbus_unregister_interface(connection, tag->path, + NFC_TAG_INTERFACE); + g_free(tag->path); g_free(tag->data); g_free(tag); |