summaryrefslogtreecommitdiff
path: root/src/ua.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ua.c')
-rw-r--r--src/ua.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ua.c b/src/ua.c
index c30be6a..2a1e1c3 100644
--- a/src/ua.c
+++ b/src/ua.c
@@ -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;