diff options
author | Alfred E. Heggestad <aeh@db.org> | 2014-07-06 12:34:14 +0200 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2014-07-06 12:34:14 +0200 |
commit | 648a9333e547add1665d7bbb29b0ec75d5ace3a9 (patch) | |
tree | a8e7c3371660f01a980216c4f76b6799bc2680b1 /src/ua.c | |
parent | 75c2b026be9d255d667fa04c0e095fd4f4fa3740 (diff) |
add ua_unregister() to un-REGISTER client
Diffstat (limited to 'src/ua.c')
-rw-r--r-- | src/ua.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -191,6 +191,28 @@ int ua_register(struct ua *ua) } +/** + * Unregister all Register clients of a User-Agent + * + * @param ua User-Agent + */ +void ua_unregister(struct ua *ua) +{ + struct le *le; + + if (!ua) + return; + + ua_event(ua, UA_EVENT_UNREGISTERING, NULL, NULL); + + for (le = ua->regl.head; le; le = le->next) { + struct reg *reg = le->data; + + reg_unregister(reg); + } +} + + bool ua_isregistered(const struct ua *ua) { struct le *le; |