pidgin.2.x.y: 1f57443e: Minor refactoring of purple_media_backen...

rlaager at pidgin.im rlaager at pidgin.im
Fri Apr 6 00:42:52 EDT 2012


----------------------------------------------------------------------
Revision: 1f57443e276782649f964e5c3c2e9213317bf368
Parent:   90a5af0a7e4f5d750c4dd418f9f752a59c717182
Author:   rlaager at pidgin.im
Date:     04/04/12 18:54:48
Branch:   im.pidgin.pidgin.2.x.y
URL: http://d.pidgin.im/viewmtn/revision/info/1f57443e276782649f964e5c3c2e9213317bf368

Changelog: 

Minor refactoring of purple_media_backend_fs2_codecs_ready()

This simplifies the upcoming farstream changes.

Changes against parent 90a5af0a7e4f5d750c4dd418f9f752a59c717182

  patched  libpurple/media/backend-fs2.c

-------------- next part --------------
============================================================
--- libpurple/media/backend-fs2.c	2e995e6e3030c0ee13f88f5a0c8d6a47e1446828
+++ libpurple/media/backend-fs2.c	7880795b2acf380bec5f8ef6227196cf64951896
@@ -2022,10 +2022,10 @@ purple_media_backend_fs2_codecs_ready(Pu
 			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 @@ purple_media_backend_fs2_codecs_ready(Pu
 		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)


More information about the Commits mailing list