changeset 27231:627d23bfdb05

Increase the logging level of some debugging messages that seemed to be a bit more important than "informational". From a patch by Mauro but with additional changes recommended by rekkanoryo. Fixes #8751. committer: Elliott Sales de Andrade <qulogic@pidgin.im>
author mauro.brasil@tqi.com.br
date Thu, 02 Jul 2009 04:26:00 +0000
parents 75acd9ad14be
children 5dcee348bc22
files libpurple/account.c libpurple/certificate.c libpurple/cipher.c libpurple/dnsquery.c libpurple/network.c libpurple/plugin.c libpurple/pluginpref.c libpurple/proxy.c libpurple/stun.c libpurple/upnp.c libpurple/win32/win32dep.c
diffstat 11 files changed, 42 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/account.c	Thu Jul 02 01:33:11 2009 +0000
+++ b/libpurple/account.c	Thu Jul 02 04:26:00 2009 +0000
@@ -2660,7 +2660,7 @@
 	/* If we're not connected to the Internet right now, we bail on this */
 	if (!purple_network_is_available())
 	{
-		purple_debug_info("account", "Network not connected; skipping reconnect\n");
+		purple_debug_warning("account", "Network not connected; skipping reconnect\n");
 		return;
 	}
 
--- a/libpurple/certificate.c	Thu Jul 02 01:33:11 2009 +0000
+++ b/libpurple/certificate.c	Thu Jul 02 04:26:00 2009 +0000
@@ -93,14 +93,11 @@
 				  "Successfully verified certificate for %s\n",
 				  vrq->subject_name);
 	} else {
-		purple_debug_info("certificate",
+		purple_debug_error("certificate",
 				  "Failed to verify certificate for %s\n",
 				  vrq->subject_name);
 	}
 
-
-
-
 	/* Pass the results on to the request's callback */
 	(vrq->cb)(st, vrq->cb_data);
 
@@ -224,7 +221,7 @@
 		/* Check the signature for this link */
 		if (! purple_certificate_signed_by(crt, issuer) ) {
 			uid = purple_certificate_get_unique_id(issuer);
-			purple_debug_info("certificate",
+			purple_debug_error("certificate",
 					  "...Bad or missing signature by %s\nChain is INVALID\n",
 					  uid);
 			g_free(uid);
@@ -681,7 +678,7 @@
 	/* Check that X.509 is registered */
 	x509 = purple_certificate_find_scheme(x509_ca.scheme_name);
 	if ( !x509 ) {
-		purple_debug_info("certificate/x509/ca",
+		purple_debug_warning("certificate/x509/ca",
 				  "Lazy init failed because an X.509 Scheme "
 				  "is not yet registered. Maybe it will be "
 				  "better later.\n");
@@ -1162,7 +1159,7 @@
 		purple_certificate_verify_complete(vrq,
 						   PURPLE_CERTIFICATE_VALID);
 	} else {
-		purple_debug_info("certificate/x509/tls_cached",
+		purple_debug_warning("certificate/x509/tls_cached",
 				  "User REJECTED cert\n");
 		purple_certificate_verify_complete(vrq,
 						   PURPLE_CERTIFICATE_INVALID);
@@ -1273,7 +1270,7 @@
 		purple_certificate_verify_complete(vrq,
 						   PURPLE_CERTIFICATE_VALID);
 	} else {
-		purple_debug_info("certificate/x509/tls_cached",
+		purple_debug_error("certificate/x509/tls_cached",
 				  "Peer cert did NOT match cached\n");
 		/* vrq now becomes the problem of the user */
 		x509_tls_cached_unknown_peer(vrq);
@@ -1377,7 +1374,7 @@
 			  ca_id);
 	ca_crt = purple_certificate_pool_retrieve(ca, ca_id);
 	if ( NULL == ca_crt ) {
-		purple_debug_info("certificate/x509/tls_cached",
+		purple_debug_warning("certificate/x509/tls_cached",
 				  "Certificate Authority with DN='%s' not "
 				  "found. I'll prompt the user, I guess.\n",
 				  ca_id);
@@ -1426,7 +1423,7 @@
 		gchar *sn = purple_certificate_get_subject_name(peer_crt);
 		gchar *msg;
 
-		purple_debug_info("certificate/x509/tls_cached",
+		purple_debug_error("certificate/x509/tls_cached",
 				  "Name mismatch: Certificate given for %s "
 				  "has a name of %s\n",
 				  vrq->subject_name, sn);
@@ -1504,7 +1501,7 @@
 		/* vrq is now the responsibility of cert_in_cache */
 		x509_tls_cached_cert_in_cache(vrq);
 	} else {
-		purple_debug_info("certificate/x509/tls_cached",
+		purple_debug_warning("certificate/x509/tls_cached",
 				  "...Not in cache\n");
 		/* vrq now becomes the problem of unknown_peer */
 		x509_tls_cached_unknown_peer(vrq);
--- a/libpurple/cipher.c	Thu Jul 02 01:33:11 2009 +0000
+++ b/libpurple/cipher.c	Thu Jul 02 04:26:00 2009 +0000
@@ -2379,7 +2379,7 @@
 	g_return_val_if_fail(cipher, FALSE);
 
 	if(!cipher->ops->append || !cipher->ops->digest) {
-		purple_debug_info("cipher", "purple_cipher_region failed: "
+		purple_debug_warning("cipher", "purple_cipher_region failed: "
 						"the %s cipher does not support appending and or "
 						"digesting.", cipher->name);
 		return FALSE;
@@ -2527,7 +2527,7 @@
 	if(cipher->ops && cipher->ops->set_option)
 		cipher->ops->set_option(context, name, value);
 	else
-		purple_debug_info("cipher", "the %s cipher does not support the "
+		purple_debug_warning("cipher", "the %s cipher does not support the "
 						"set_option operation\n", cipher->name);
 }
 
@@ -2544,7 +2544,7 @@
 	if(cipher->ops && cipher->ops->get_option)
 		return cipher->ops->get_option(context, name);
 	else {
-		purple_debug_info("cipher", "the %s cipher does not support the "
+		purple_debug_warning("cipher", "the %s cipher does not support the "
 						"get_option operation\n", cipher->name);
 
 		return NULL;
@@ -2627,7 +2627,7 @@
 	if(cipher->ops && cipher->ops->set_iv)
 		cipher->ops->set_iv(context, iv, len);
 	else
-		purple_debug_info("cipher", "the %s cipher does not support the set"
+		purple_debug_warning("cipher", "the %s cipher does not support the set"
 						"initialization vector operation\n", cipher->name);
 }
 
@@ -2645,7 +2645,7 @@
 	if(cipher->ops && cipher->ops->append)
 		cipher->ops->append(context, data, len);
 	else
-		purple_debug_info("cipher", "the %s cipher does not support the append "
+		purple_debug_warning("cipher", "the %s cipher does not support the append "
 						"operation\n", cipher->name);
 }
 
@@ -2662,7 +2662,7 @@
 	if(cipher->ops && cipher->ops->digest)
 		return cipher->ops->digest(context, in_len, digest, out_len);
 	else {
-		purple_debug_info("cipher", "the %s cipher does not support the digest "
+		purple_debug_warning("cipher", "the %s cipher does not support the digest "
 						"operation\n", cipher->name);
 		return FALSE;
 	}
@@ -2712,7 +2712,7 @@
 	if(cipher->ops && cipher->ops->encrypt)
 		return cipher->ops->encrypt(context, data, len, output, outlen);
 	else {
-		purple_debug_info("cipher", "the %s cipher does not support the encrypt"
+		purple_debug_warning("cipher", "the %s cipher does not support the encrypt"
 						"operation\n", cipher->name);
 
 		if(outlen)
@@ -2736,7 +2736,7 @@
 	if(cipher->ops && cipher->ops->decrypt)
 		return cipher->ops->decrypt(context, data, len, output, outlen);
 	else {
-		purple_debug_info("cipher", "the %s cipher does not support the decrypt"
+		purple_debug_warning("cipher", "the %s cipher does not support the decrypt"
 						"operation\n", cipher->name);
 
 		if(outlen)
@@ -2758,7 +2758,7 @@
 	if(cipher->ops && cipher->ops->set_salt)
 		cipher->ops->set_salt(context, salt);
 	else
-		purple_debug_info("cipher", "the %s cipher does not support the "
+		purple_debug_warning("cipher", "the %s cipher does not support the "
 						"set_salt operation\n", cipher->name);
 }
 
@@ -2774,7 +2774,7 @@
 	if(cipher->ops && cipher->ops->get_salt_size)
 		return cipher->ops->get_salt_size(context);
 	else {
-		purple_debug_info("cipher", "the %s cipher does not support the "
+		purple_debug_warning("cipher", "the %s cipher does not support the "
 						"get_salt_size operation\n", cipher->name);
 
 		return -1;
@@ -2793,7 +2793,7 @@
 	if(cipher->ops && cipher->ops->set_key)
 		cipher->ops->set_key(context, key);
 	else
-		purple_debug_info("cipher", "the %s cipher does not support the "
+		purple_debug_warning("cipher", "the %s cipher does not support the "
 						"set_key operation\n", cipher->name);
 }
 
@@ -2809,7 +2809,7 @@
 	if(cipher->ops && cipher->ops->get_key_size)
 		return cipher->ops->get_key_size(context);
 	else {
-		purple_debug_info("cipher", "the %s cipher does not support the "
+		purple_debug_warning("cipher", "the %s cipher does not support the "
 						"get_key_size operation\n", cipher->name);
 
 		return -1;
@@ -2830,7 +2830,7 @@
 	if(cipher->ops && cipher->ops->set_batch_mode)
 		cipher->ops->set_batch_mode(context, mode);
 	else
-		purple_debug_info("cipher", "The %s cipher does not support the "
+		purple_debug_warning("cipher", "The %s cipher does not support the "
 		                            "set_batch_mode operation\n", cipher->name);
 }
 
@@ -2847,7 +2847,7 @@
 	if(cipher->ops && cipher->ops->get_batch_mode)
 		return cipher->ops->get_batch_mode(context);
 	else {
-		purple_debug_info("cipher", "The %s cipher does not support the "
+		purple_debug_warning("cipher", "The %s cipher does not support the "
 		                            "get_batch_mode operation\n", cipher->name);
 		return -1;
 	}
@@ -2866,7 +2866,7 @@
 	if(cipher->ops && cipher->ops->get_block_size)
 		return cipher->ops->get_block_size(context);
 	else {
-		purple_debug_info("cipher", "The %s cipher does not support the "
+		purple_debug_warning("cipher", "The %s cipher does not support the "
 		                            "get_block_size operation\n", cipher->name);
 		return -1;
 	}
@@ -2886,7 +2886,7 @@
 	if(cipher->ops && cipher->ops->set_key_with_len)
 		cipher->ops->set_key_with_len(context, key, len);
 	else
-		purple_debug_info("cipher", "The %s cipher does not support the "
+		purple_debug_warning("cipher", "The %s cipher does not support the "
 		                            "set_key_with_len operation\n", cipher->name);
 }
 
--- a/libpurple/dnsquery.c	Thu Jul 02 01:33:11 2009 +0000
+++ b/libpurple/dnsquery.c	Thu Jul 02 04:26:00 2009 +0000
@@ -127,7 +127,7 @@
 static void
 purple_dnsquery_failed(PurpleDnsQueryData *query_data, const gchar *error_message)
 {
-	purple_debug_info("dnsquery", "%s\n", error_message);
+	purple_debug_error("dnsquery", "%s\n", error_message);
 	if (query_data->callback != NULL)
 		query_data->callback(NULL, query_data->data, error_message);
 	purple_dnsquery_destroy(query_data);
--- a/libpurple/network.c	Thu Jul 02 01:33:11 2009 +0000
+++ b/libpurple/network.c	Thu Jul 02 04:26:00 2009 +0000
@@ -240,7 +240,7 @@
 	/* listen_data->pnp_data = NULL; */
 
 	if (!success) {
-		purple_debug_info("network", "Couldn't create UPnP mapping\n");
+		purple_debug_warning("network", "Couldn't create UPnP mapping\n");
 		if (listen_data->retry) {
 			listen_data->retry = FALSE;
 			listen_data->adding = FALSE;
--- a/libpurple/plugin.c	Thu Jul 02 01:33:11 2009 +0000
+++ b/libpurple/plugin.c	Thu Jul 02 04:26:00 2009 +0000
@@ -222,7 +222,7 @@
 			return plugin;
 		else if (!purple_plugin_is_unloadable(plugin))
 		{
-			purple_debug_info("plugins", "Not loading %s. "
+			purple_debug_warning("plugins", "Not loading %s. "
 							"Another plugin with the same name (%s) has already been loaded.\n",
 							filename, plugin->path);
 			return plugin;
--- a/libpurple/pluginpref.c	Thu Jul 02 01:33:11 2009 +0000
+++ b/libpurple/pluginpref.c	Thu Jul 02 04:26:00 2009 +0000
@@ -196,7 +196,7 @@
 
 	if (purple_prefs_get_type(pref->name) != PURPLE_PREF_INT)
 	{
-		purple_debug_info("pluginpref",
+		purple_debug_warning("pluginpref",
 				"purple_plugin_pref_set_bounds: %s is not an integer pref\n",
 				pref->name);
 		return;
@@ -220,7 +220,7 @@
 
 	if (purple_prefs_get_type(pref->name) != PURPLE_PREF_INT)
 	{
-		purple_debug(PURPLE_DEBUG_INFO, "pluginpref",
+		purple_debug_warning("pluginpref",
 				"purple_plugin_pref_get_bounds: %s is not an integer pref\n",
 				pref->name);
 		return;
--- a/libpurple/proxy.c	Thu Jul 02 01:33:11 2009 +0000
+++ b/libpurple/proxy.c	Thu Jul 02 04:26:00 2009 +0000
@@ -403,7 +403,7 @@
 		MyWinHttpGetIEProxyConfig = (LPFNWINHTTPGETIEPROXYCONFIG)
 			wpurple_find_and_loadproc("winhttp.dll", "WinHttpGetIEProxyConfigForCurrentUser");
 		if (!MyWinHttpGetIEProxyConfig)
-			purple_debug_info("proxy", "Unable to read Windows Proxy Settings.\n");
+			purple_debug_warning("proxy", "Unable to read Windows Proxy Settings.\n");
 	}
 
 	if (!MyWinHttpGetIEProxyConfig)
@@ -572,7 +572,7 @@
 
 	if (error_message != NULL)
 	{
-		purple_debug_info("proxy", "Connection attempt failed: %s\n",
+		purple_debug_error("proxy", "Connection attempt failed: %s\n",
 				error_message);
 		if (connect_data->hosts != NULL)
 			try_connect(connect_data);
@@ -658,7 +658,7 @@
 	if (ret != 0 || error != 0) {
 		if (ret != 0)
 			error = errno;
-		purple_debug_info("proxy", "Error connecting to %s:%d (%s).\n",
+		purple_debug_error("proxy", "Error connecting to %s:%d (%s).\n",
 						connect_data->host, connect_data->port, g_strerror(error));
 
 		purple_proxy_connect_data_disconnect(connect_data, g_strerror(error));
--- a/libpurple/stun.c	Thu Jul 02 01:33:11 2009 +0000
+++ b/libpurple/stun.c	Thu Jul 02 04:26:00 2009 +0000
@@ -116,7 +116,7 @@
 static gboolean timeoutfunc(gpointer data) {
 	struct stun_conn *sc = data;
 	if(sc->retry >= 2) {
-		purple_debug_info("stun", "request timed out, giving up.\n");
+		purple_debug_warning("stun", "request timed out, giving up.\n");
 		if(sc->test == 2)
 			nattype.type = PURPLE_STUN_NAT_TYPE_SYMMETRIC;
 
@@ -176,19 +176,19 @@
 
 	len = recv(source, buffer, sizeof(buffer) - 1, 0);
 	if (!len) {
-		purple_debug_info("stun", "unable to read stun response\n");
+		purple_debug_warning("stun", "unable to read stun response\n");
 		return;
 	}
 	buffer[len] = '\0';
 
 	if (len < sizeof(struct stun_header)) {
-		purple_debug_info("stun", "got invalid response\n");
+		purple_debug_warning("stun", "got invalid response\n");
 		return;
 	}
 
 	hdr = (struct stun_header*) buffer;
 	if (len != (ntohs(hdr->len) + sizeof(struct stun_header))) {
-		purple_debug_info("stun", "got incomplete response\n");
+		purple_debug_warning("stun", "got incomplete response\n");
 		return;
 	}
 
@@ -197,13 +197,13 @@
 			|| hdr->transid[1] != sc->packet->transid[1]
 			|| hdr->transid[2] != sc->packet->transid[2]
 			|| hdr->transid[3] != sc->packet->transid[3]) {
-		purple_debug_info("stun", "got wrong transid\n");
+		purple_debug_warning("stun", "got wrong transid\n");
 		return;
 	}
 
 	if(sc->test==1) {
 		if (hdr->type != MSGTYPE_BINDINGRESPONSE) {
-			purple_debug_info("stun",
+			purple_debug_warning("stun",
 				"Expected Binding Response, got %d\n",
 				hdr->type);
 			return;
--- a/libpurple/upnp.c	Thu Jul 02 01:33:11 2009 +0000
+++ b/libpurple/upnp.c	Thu Jul 02 04:26:00 2009 +0000
@@ -807,7 +807,7 @@
 				control_info.internalip);
 		close(source);
 	} else
-		purple_debug_info("upnp", "Unable to look up local IP\n");
+		purple_debug_error("upnp", "Unable to look up local IP\n");
 
 }
 
--- a/libpurple/win32/win32dep.c	Thu Jul 02 01:33:11 2009 +0000
+++ b/libpurple/win32/win32dep.c	Thu Jul 02 04:26:00 2009 +0000
@@ -326,7 +326,7 @@
 
 	if (rv != ERROR_SUCCESS) {
 		char *errmsg = g_win32_error_message(rv);
-		purple_debug_info("wpurple", "Could not open reg key '%s' subkey '%s'.\nMessage: (%ld) %s\n",
+		purple_debug_error("wpurple", "Could not open reg key '%s' subkey '%s'.\nMessage: (%ld) %s\n",
 					((rootkey == HKEY_LOCAL_MACHINE) ? "HKLM" :
 					 (rootkey == HKEY_CURRENT_USER) ? "HKCU" :
 					  (rootkey == HKEY_CLASSES_ROOT) ? "HKCR" : "???"),
@@ -356,7 +356,7 @@
 
 	if (rv != ERROR_SUCCESS) {
 		char *errmsg = g_win32_error_message(rv);
-		purple_debug_info("wpurple", "Could not read from reg key value '%s'.\nMessage: (%ld) %s\n",
+		purple_debug_error("wpurple", "Could not read from reg key value '%s'.\nMessage: (%ld) %s\n",
 					valname, rv, errmsg);
 		g_free(errmsg);
 	}