# HG changeset patch # User jakub.adam@ktknet.cz # Date 1293534217 0 # Node ID a202f4dcbb9610d46b662c8cd76f958a7099f6f7 # Parent 6caa1318af63b0cd34f17a01338b452bfb8cc588 Stop sending audio when placing a call on hold. Fixes #13032. committer: John Bailey diff -r 6caa1318af63 -r a202f4dcbb96 ChangeLog --- a/ChangeLog Tue Dec 28 10:49:46 2010 +0000 +++ b/ChangeLog Tue Dec 28 11:03:37 2010 +0000 @@ -1,6 +1,9 @@ Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul version 2.7.10 (??/??/????): + libpurple: + * Stop sending audio when placing a call on hold (Jakub Adam) (#13032) + Pidgin: * Support using the Page Up and Page Down keys on the numeric keypad in the conversation window. (Ryan Flegel) (#13127) diff -r 6caa1318af63 -r a202f4dcbb96 libpurple/media/backend-fs2.c --- a/libpurple/media/backend-fs2.c Tue Dec 28 10:49:46 2010 +0000 +++ b/libpurple/media/backend-fs2.c Tue Dec 28 11:03:37 2010 +0000 @@ -1129,6 +1129,21 @@ g_object_set(volume, "mute", active, NULL); } } + } else if (local == TRUE && (type == PURPLE_MEDIA_INFO_HOLD || + type == PURPLE_MEDIA_INFO_UNHOLD)) { + gboolean active = (type == PURPLE_MEDIA_INFO_HOLD); + GList *streams = get_streams(self, sid, name); + for (; streams; streams = + g_list_delete_link(streams, streams)) { + PurpleMediaBackendFs2Stream *stream = streams->data; + if (stream->session->type & PURPLE_MEDIA_SEND_AUDIO) { + g_object_set(stream->stream, "direction", + session_type_to_fs_stream_direction( + stream->session->type & ((active) ? + ~PURPLE_MEDIA_SEND_AUDIO : + PURPLE_MEDIA_AUDIO)), NULL); + } + } } else if (local == TRUE && (type == PURPLE_MEDIA_INFO_PAUSE || type == PURPLE_MEDIA_INFO_UNPAUSE)) { gboolean active = (type == PURPLE_MEDIA_INFO_PAUSE);