[asterisk-commits] sgriepentrog: branch group/media_formats-reviewed-trunk r418437 - /team/group...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Jul 12 01:01:05 CDT 2014
Author: sgriepentrog
Date: Sat Jul 12 01:00:58 2014
New Revision: 418437
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=418437
Log:
media-formats: chan_sip ref leak on peer for mwi sub
Add unref of peer object once MWI subscription has been
released.
Modified:
team/group/media_formats-reviewed-trunk/channels/chan_sip.c
Modified: team/group/media_formats-reviewed-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats-reviewed-trunk/channels/chan_sip.c?view=diff&rev=418437&r1=418436&r2=418437
==============================================================================
--- team/group/media_formats-reviewed-trunk/channels/chan_sip.c (original)
+++ team/group/media_formats-reviewed-trunk/channels/chan_sip.c Sat Jul 12 01:00:58 2014
@@ -3384,7 +3384,7 @@
ao2_t_callback(peers, OBJ_NODATA | OBJ_UNLINK | OBJ_MULTIPLE,
match_and_cleanup_peer_sched, &flag, "initiating callback to remove marked peers");
ao2_t_callback(peers_by_ip, OBJ_NODATA | OBJ_UNLINK | OBJ_MULTIPLE,
- match_and_cleanup_peer_sched, &flag, "initiating callback to remove marked peers");
+ match_and_cleanup_peer_sched, &flag, "initiating callback to remove marked peers_by_ip");
}
/* \brief Unlink all marked peers from ao2 containers */
@@ -5236,6 +5236,7 @@
while ((mailbox = AST_LIST_REMOVE_HEAD(&peer->mailboxes, entry)))
destroy_mailbox(mailbox);
+ ao2_t_ref(peer, -1, "unsubscribed to mwi events for peer");
}
static void sip_destroy_peer_fn(void *peer)
@@ -27284,7 +27285,7 @@
mailbox_specific_topic = ast_mwi_topic(mailbox->id);
if (mailbox_specific_topic) {
- ao2_ref(peer, +1);
+ ao2_t_ref(peer, +1, "subscribe to mwi events for peer");
mailbox->event_sub = stasis_subscribe(mailbox_specific_topic, mwi_event_cb, peer);
}
}
More information about the asterisk-commits
mailing list