changeset 32765:60bd913072f7

Minor refactoring of purple_media_backend_fs2_codecs_ready() This simplifies the upcoming farstream changes.
author Richard Laager <rlaager@wiktel.com>
date Wed, 04 Apr 2012 22:54:48 +0000
parents cde7e464221b
children fd1b4bbefc6b
files libpurple/media/backend-fs2.c
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media/backend-fs2.c	Wed Apr 04 22:25:36 2012 +0000
+++ b/libpurple/media/backend-fs2.c	Wed Apr 04 22:54:48 2012 +0000
@@ -2022,10 +2022,10 @@
 			return FALSE;
 
 		if (session->type & (PURPLE_MEDIA_SEND_AUDIO |
-				PURPLE_MEDIA_SEND_VIDEO))
+				PURPLE_MEDIA_SEND_VIDEO)) {
 			g_object_get(session->session,
 					"codecs-ready", &ret, NULL);
-		else
+		} else
 			ret = TRUE;
 	} else {
 		GList *values = g_hash_table_get_values(priv->sessions);
@@ -2033,14 +2033,13 @@
 		for (; values; values = g_list_delete_link(values, values)) {
 			PurpleMediaBackendFs2Session *session = values->data;
 			if (session->type & (PURPLE_MEDIA_SEND_AUDIO |
-					PURPLE_MEDIA_SEND_VIDEO))
+					PURPLE_MEDIA_SEND_VIDEO)) {
 				g_object_get(session->session,
 						"codecs-ready", &ret, NULL);
-			else
+				if (ret == FALSE)
+					break;
+			} else
 				ret = TRUE;
-
-			if (ret == FALSE)
-				break;
 		}
 
 		if (values != NULL)