diff options
author | Andrew Zaborowski <andrew.zaborowski@intel.com> | 2020-02-07 12:39:11 +0100 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2020-02-07 15:34:14 -0600 |
commit | 053c1ca2a28577e2d4b83b35caf5060999440703 (patch) | |
tree | 0278648de2be0d0c335efec64914b2527474fdf0 | |
parent | 16cc2386f136a0b46ad12ea51f09e9655f517c3a (diff) | |
download | iwd-053c1ca2a28577e2d4b83b35caf5060999440703.tar.gz |
frame-xchg: Add new groups to watch_groups list
I forgot to actually add new groups being created in
frame_watch_group_get to the watch_groups queue, meaning that we'd
re-create the group every time a new watch was added to the group.
-rw-r--r-- | src/frame-xchg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/frame-xchg.c b/src/frame-xchg.c index 31d9c2293..78ee913b0 100644 --- a/src/frame-xchg.c +++ b/src/frame-xchg.c @@ -258,16 +258,19 @@ err: static struct watch_group *frame_watch_group_get(uint64_t wdev_id, uint32_t id) { const struct l_queue_entry *entry; + struct watch_group *group; for (entry = l_queue_get_entries(watch_groups); entry; entry = entry->next) { - struct watch_group *group = entry->data; + group = entry->data; if (group->id == id && (id == 0 || group->wdev_id == wdev_id)) return group; } - return frame_watch_group_new(wdev_id, id); + group = frame_watch_group_new(wdev_id, id); + l_queue_push_tail(watch_groups, group); + return group; } static void frame_watch_register_cb(struct l_genl_msg *msg, void *user_data) |