diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-20 14:18:33 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-20 14:18:33 +0300 |
commit | e5015624453d81d34ab049654e1af5f01e318f54 (patch) | |
tree | 8a33c1cc458f3509fee001ae69b5f0e8146df39e | |
parent | 34e61befec8a9ec737d89e85f2eeb13965adae34 (diff) |
Call exit_callback with correct parameters upon path removal
-rw-r--r-- | plugins/service.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/service.c b/plugins/service.c index 56dde3ff..d154255f 100644 --- a/plugins/service.c +++ b/plugins/service.c @@ -725,8 +725,13 @@ static GDBusMethodTable service_methods[] = { static void path_unregister(void *data) { struct service_adapter *serv_adapter = data; + GSList *l, *next = NULL; - g_slist_foreach(serv_adapter->records, (GFunc) exit_callback, NULL); + for (l = serv_adapter->records; l != NULL; l = next) { + struct record_data *user_record = l->data; + next = l->next; + exit_callback(connection, user_record); + } } static int service_probe(struct btd_adapter *adapter) |