Skip to content

Commit b4fcb1f

Browse files
committed
add cleanup on mod_destroy
1 parent 72ff314 commit b4fcb1f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/janus/janus_mod.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,14 @@ static int child_init(int rank)
174174

175175
static void mod_destroy(void)
176176
{
177-
/* TODO - destroy */
177+
struct list_head *_, *__;
178+
janus_connection *sock = NULL;
179+
180+
list_for_each_safe(_, __, janus_sockets) {
181+
sock = list_entry(_, janus_connection, list);
182+
183+
janus_free_connection(sock);
184+
}
178185
}
179186

180187
static int w_janus_send_request(struct sip_msg *msg, str *janus_id,str *request, pv_spec_t *reply_spec)

0 commit comments

Comments
 (0)