pidgin: 3dc30db9: Add some extra error strings just in cas...

maiku at pidgin.im maiku at pidgin.im
Fri Aug 28 03:35:40 EDT 2009


-----------------------------------------------------------------
Revision: 3dc30db9c8f1da2d0c574163fe37658d8b26f95d
Ancestor: 4b37450c5470f1f61cdba5cf5de7a6abb166b2c1
Author: maiku at pidgin.im
Date: 2009-08-28T07:25:43
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3dc30db9c8f1da2d0c574163fe37658d8b26f95d

Modified files:
        libpurple/media.c

ChangeLog: 

Add some extra error strings just in case.

-------------- next part --------------
============================================================
--- libpurple/media.c	f5ec543c7281b6a8e1e16039d3941c7502b9fb77
+++ libpurple/media.c	0ae11c4c03babef77a467124e68364c6faa71bff
@@ -2046,13 +2046,32 @@ media_bus_call(GstBus *bus, GstMessage *
 				FsError error_no;
 				gst_structure_get_enum(msg->structure, "error-no",
 						FS_TYPE_ERROR, (gint*)&error_no);
-				/*
-				 * Unknown CName is only a problem for the
-				 * multicast transmitter which isn't used.
-				 */
-				if (error_no != FS_ERROR_UNKNOWN_CNAME)
-					purple_debug_error("media", "farsight-error: %i: %s\n", error_no,
-						  	gst_structure_get_string(msg->structure, "error-msg"));
+				switch (error_no) {
+					case FS_ERROR_NO_CODECS:
+						purple_media_error(media, _("No codecs found. Install some GStreamer codecs found in GStreamer plugins packages."));
+						purple_media_end(media, NULL, NULL);
+						break;
+					case FS_ERROR_NO_CODECS_LEFT:
+						purple_media_error(media, _("No codecs left. Your codec preferences in fs-codecs.conf are too strict."));
+						purple_media_end(media, NULL, NULL);
+						break;
+					case FS_ERROR_UNKNOWN_CNAME:
+					/*
+					 * Unknown CName is only a problem for the
+					 * multicast transmitter which isn't used.
+					 * It is also deprecated.
+					 */
+						break;
+					default:
+						purple_debug_error("media", "farsight-error: %i: %s\n", error_no,
+							  	gst_structure_get_string(msg->structure, "error-msg"));
+						break;
+				}
+
+				if (FS_ERROR_IS_FATAL(error_no)) {
+					purple_media_error(media, _("A non-recoverable Farsight2 error has occurred."));
+					purple_media_end(media, NULL, NULL);
+				}
 			} else if (gst_structure_has_name(msg->structure,
 					"farsight-new-local-candidate")) {
 				FsStream *stream = g_value_get_object(gst_structure_get_value(msg->structure, "stream"));
@@ -2570,7 +2589,7 @@ purple_media_add_stream(PurpleMedia *med
 				media->priv->conference, media_type, &err);
 
 		if (err != NULL) {
-			purple_media_error(media, "Error creating session: %s\n", err->message);
+			purple_media_error(media, _("Error creating session: %s"), err->message);
 			g_error_free(err);
 			g_free(session);
 			return FALSE;


More information about the Commits mailing list