comparison libpurple/media/media.c @ 29600:80bdae3ea957

Free participants properly in purple_media_end.
author maiku@pidgin.im
date Wed, 28 Oct 2009 18:16:59 +0000
parents 78ac6e4d3de9
children bcee1aab1c01
comparison
equal deleted inserted replaced
29599:78ac6e4d3de9 29600:80bdae3ea957
705 705
706 /* Remove participants with no streams left (just emit the signal) */ 706 /* Remove participants with no streams left (just emit the signal) */
707 for (; participants; participants = 707 for (; participants; participants =
708 g_list_delete_link(participants, participants)) { 708 g_list_delete_link(participants, participants)) {
709 gchar *participant = participants->data; 709 gchar *participant = participants->data;
710 710 GList *link = g_list_find_custom(media->priv->participants,
711 participant, (GCompareFunc)strcmp);
712
711 g_signal_emit(media, purple_media_signals[STATE_CHANGED], 713 g_signal_emit(media, purple_media_signals[STATE_CHANGED],
712 0, PURPLE_MEDIA_STATE_END, 714 0, PURPLE_MEDIA_STATE_END,
713 NULL, participant); 715 NULL, participant);
716
717 if (link != NULL) {
718 g_free(link->data);
719 media->priv->participants = g_list_delete_link(
720 media->priv->participants, link);
721 }
714 722
715 g_free(participant); 723 g_free(participant);
716 } 724 }
717 725
718 /* Free the conference if no sessions left */ 726 /* Free the conference if no sessions left */