diff options
author | Alfred E. Heggestad <aeh@db.org> | 2014-11-18 21:38:33 +0100 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2014-11-18 21:38:33 +0100 |
commit | 20d56b74a75b5e4380e0aafbee09909495fd83b0 (patch) | |
tree | efa6d7bdf558220b560231fb146f7ba0b363928e /src/ua.c | |
parent | 35f6874689cd9435a64760598398d1e499c20c71 (diff) |
ua: make ua_event(), allow handlers to unregister itself
Diffstat (limited to 'src/ua.c')
-rw-r--r-- | src/ua.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -120,9 +120,10 @@ void ua_event(struct ua *ua, enum ua_event ev, struct call *call, va_end(ap); /* send event to all clients */ - for (le = uag.ehl.head; le; le = le->next) { - + le = uag.ehl.head; + while (le) { struct ua_eh *eh = le->data; + le = le->next; eh->h(ua, ev, call, buf, eh->arg); } |