pidgin: d97da8f9: Remove periods and newlines from many er...

markdoliner at pidgin.im markdoliner at pidgin.im
Mon Jul 6 05:16:06 EDT 2009


-----------------------------------------------------------------
Revision: d97da8f9cf87658421693170c812b3ae061ca577
Ancestor: 03ee404f3c1ea6691cdcfd91078e936c04033975
Author: markdoliner at pidgin.im
Date: 2009-07-06T05:33:27
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d97da8f9cf87658421693170c812b3ae061ca577

Modified files:
        libpurple/proxy.c

ChangeLog: 

Remove periods and newlines from many error messages that end up being used
when calling purple_connection_error().  I think these look cleaner this
way.  I'm hoping this won't harm many other places... I know
purple_proxy_connect() is used all over the place

-------------- next part --------------
============================================================
--- libpurple/proxy.c	6d59c36712283fc72b9b94eae3a801b3a16baa23
+++ libpurple/proxy.c	56164fc5c945cc03f194d7d2ac7e805b98d63178
@@ -688,7 +688,7 @@ proxy_connect_udp_none(PurpleProxyConnec
 	if (connect_data->fd < 0)
 	{
 		purple_proxy_connect_data_disconnect_formatted(connect_data,
-				_("Unable to create socket:\n%s"), g_strerror(errno));
+				_("Unable to create socket: %s"), g_strerror(errno));
 		return;
 	}
 
@@ -750,7 +750,7 @@ proxy_connect_none(PurpleProxyConnectDat
 	if (connect_data->fd < 0)
 	{
 		purple_proxy_connect_data_disconnect_formatted(connect_data,
-				_("Unable to create socket:\n%s"), g_strerror(errno));
+				_("Unable to create socket: %s"), g_strerror(errno));
 		return;
 	}
 
@@ -871,7 +871,7 @@ http_canread(gpointer data, gint source,
 
 	if (len == 0) {
 		purple_proxy_connect_data_disconnect(connect_data,
-				_("Server closed the connection."));
+				_("Server closed the connection"));
 		return;
 	}
 
@@ -882,7 +882,7 @@ http_canread(gpointer data, gint source,
 
 		/* Error! */
 		purple_proxy_connect_data_disconnect_formatted(connect_data,
-				_("Lost connection with server:\n%s"), g_strerror(errno));
+				_("Lost connection with server: %s"), g_strerror(errno));
 		return;
 	}
 
@@ -945,7 +945,7 @@ http_canread(gpointer data, gint source,
 
 	if (error) {
 		purple_proxy_connect_data_disconnect_formatted(connect_data,
-				_("Unable to parse response from HTTP proxy: %s\n"),
+				_("Unable to parse response from HTTP proxy: %s"),
 				connect_data->read_buffer);
 		return;
 	}
@@ -1065,7 +1065,7 @@ http_canread(gpointer data, gint source,
 		if (status == 403) {
 			/* Forbidden */
 			purple_proxy_connect_data_disconnect_formatted(connect_data,
-					_("Access denied: HTTP proxy server forbids port %d tunneling."),
+					_("Access denied: HTTP proxy server forbids port %d tunneling"),
 					connect_data->port);
 		} else {
 			purple_proxy_connect_data_disconnect_formatted(connect_data,
@@ -1191,7 +1191,7 @@ proxy_connect_http(PurpleProxyConnectDat
 	if (connect_data->fd < 0)
 	{
 		purple_proxy_connect_data_disconnect_formatted(connect_data,
-				_("Unable to create socket:\n%s"), g_strerror(errno));
+				_("Unable to create socket: %s"), g_strerror(errno));
 		return;
 	}
 
@@ -1384,7 +1384,7 @@ proxy_connect_socks4(PurpleProxyConnectD
 	if (connect_data->fd < 0)
 	{
 		purple_proxy_connect_data_disconnect_formatted(connect_data,
-				_("Unable to create socket:\n%s"), g_strerror(errno));
+				_("Unable to create socket: %s"), g_strerror(errno));
 		return;
 	}
 
@@ -1453,7 +1453,7 @@ s5_canread_again(gpointer data, gint sou
 	if (len == 0)
 	{
 		purple_proxy_connect_data_disconnect(connect_data,
-				_("Server closed the connection."));
+				_("Server closed the connection"));
 		return;
 	}
 
@@ -1465,7 +1465,7 @@ s5_canread_again(gpointer data, gint sou
 
 		/* Error! */
 		purple_proxy_connect_data_disconnect_formatted(connect_data,
-				_("Lost connection with server:\n%s"), g_strerror(errno));
+				_("Lost connection with server: %s"), g_strerror(errno));
 		return;
 	}
 
@@ -1482,7 +1482,7 @@ s5_canread_again(gpointer data, gint sou
 		} else {
 			purple_debug_error("socks5 proxy", "Bad data.\n");
 			purple_proxy_connect_data_disconnect(connect_data,
-					_("Received invalid data on connection with server."));
+					_("Received invalid data on connection with server"));
 		}
 		return;
 	}
@@ -1512,7 +1512,7 @@ s5_canread_again(gpointer data, gint sou
 		default:
 			purple_debug_error("socks5 proxy", "Invalid ATYP received (0x%X)\n", buf[3]);
 			purple_proxy_connect_data_disconnect(connect_data,
-					_("Received invalid data on connection with server."));
+					_("Received invalid data on connection with server"));
 			return;
 	}
 
@@ -1567,7 +1567,7 @@ s5_readauth(gpointer data, gint source, 
 	if (len == 0)
 	{
 		purple_proxy_connect_data_disconnect(connect_data,
-				_("Server closed the connection."));
+				_("Server closed the connection"));
 		return;
 	}
 
@@ -1579,7 +1579,7 @@ s5_readauth(gpointer data, gint source, 
 
 		/* Error! */
 		purple_proxy_connect_data_disconnect_formatted(connect_data,
-				_("Lost connection with server:\n%s"), g_strerror(errno));
+				_("Lost connection with server: %s"), g_strerror(errno));
 		return;
 	}
 
@@ -1592,7 +1592,7 @@ s5_readauth(gpointer data, gint source, 
 
 	if ((connect_data->read_buffer[0] != 0x01) || (connect_data->read_buffer[1] != 0x00)) {
 		purple_proxy_connect_data_disconnect(connect_data,
-				_("Received invalid data on connection with server."));
+				_("Received invalid data on connection with server"));
 		return;
 	}
 
@@ -1663,7 +1663,7 @@ s5_parse_chap_msg(PurpleProxyConnectData
 
 	if (*cmdbuf != 0x01) {
 		purple_proxy_connect_data_disconnect(connect_data,
-				_("Received invalid data on connection with server."));
+				_("Received invalid data on connection with server"));
 		return -1;
 	}
 	cmdbuf++;
@@ -1764,7 +1764,7 @@ s5_parse_chap_msg(PurpleProxyConnectData
 						"of the socks5 CHAP specification.  "
 						"Disconnecting...");
 					purple_proxy_connect_data_disconnect(connect_data,
-							_("Received invalid data on connection with server."));
+							_("Received invalid data on connection with server"));
 					return -1;
 				}
 				break;
@@ -1803,7 +1803,7 @@ s5_readchap(gpointer data, gint source, 
 
 	if (len == 0) {
 		purple_proxy_connect_data_disconnect(connect_data,
-				_("Server closed the connection."));
+				_("Server closed the connection"));
 		return;
 	}
 
@@ -1814,7 +1814,7 @@ s5_readchap(gpointer data, gint source, 
 
 		/* Error! */
 		purple_proxy_connect_data_disconnect_formatted(connect_data,
-				_("Lost connection with server:\n%s"), g_strerror(errno));
+				_("Lost connection with server: %s"), g_strerror(errno));
 		return;
 	}
 
@@ -1878,7 +1878,7 @@ s5_canread(gpointer data, gint source, P
 	if (len == 0)
 	{
 		purple_proxy_connect_data_disconnect(connect_data,
-				_("Server closed the connection."));
+				_("Server closed the connection"));
 		return;
 	}
 
@@ -1890,7 +1890,7 @@ s5_canread(gpointer data, gint source, P
 
 		/* Error! */
 		purple_proxy_connect_data_disconnect_formatted(connect_data,
-				_("Lost connection with server:\n%s"), g_strerror(errno));
+				_("Lost connection with server: %s"), g_strerror(errno));
 		return;
 	}
 
@@ -1903,7 +1903,7 @@ s5_canread(gpointer data, gint source, P
 
 	if ((connect_data->read_buffer[0] != 0x05) || (connect_data->read_buffer[1] == 0xff)) {
 		purple_proxy_connect_data_disconnect(connect_data,
-				_("Received invalid data on connection with server."));
+				_("Received invalid data on connection with server"));
 		return;
 	}
 
@@ -2044,7 +2044,7 @@ proxy_connect_socks5(PurpleProxyConnectD
 	if (connect_data->fd < 0)
 	{
 		purple_proxy_connect_data_disconnect_formatted(connect_data,
-				_("Unable to create socket:\n%s"), g_strerror(errno));
+				_("Unable to create socket: %s"), g_strerror(errno));
 		return;
 	}
 


More information about the Commits mailing list