pidgin: a062c3ab: Increase the logging level of some debug...

qulogic at pidgin.im qulogic at pidgin.im
Thu Jul 2 23:41:17 EDT 2009


-----------------------------------------------------------------
Revision: a062c3ab68e8a6201d3375d98dedb80503136bfb
Ancestor: 2a94a16391ae2606dce84afaeb2acf8f973a455a
Author: mauro.brasil at tqi.com.br
Date: 2009-07-02T04:26:00
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a062c3ab68e8a6201d3375d98dedb80503136bfb

Modified 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

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- libpurple/account.c	f30d42673ff93f36740312dacb3ee1c876bf2936
+++ libpurple/account.c	d13791279aeb1972e500aaac359bfcf5e18b5f6f
@@ -2660,7 +2660,7 @@ purple_accounts_restore_current_statuses
 	/* 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;
 	}
 
============================================================
--- libpurple/certificate.c	bf3ec25d68ade46f7b87c054427c49fed1a5caee
+++ libpurple/certificate.c	c4df4d71255d7376fab521b9b36c855e4c9b11f0
@@ -93,14 +93,11 @@ purple_certificate_verify_complete(Purpl
 				  "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 @@ purple_certificate_check_signature_chain
 		/* 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 @@ x509_ca_lazy_init(void)
 	/* 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 @@ x509_tls_cached_user_auth_cb (x509_tls_c
 		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 @@ x509_tls_cached_cert_in_cache(PurpleCert
 		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 @@ x509_tls_cached_unknown_peer(PurpleCerti
 			  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 @@ x509_tls_cached_unknown_peer(PurpleCerti
 		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 @@ x509_tls_cached_start_verify(PurpleCerti
 		/* 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);
============================================================
--- libpurple/cipher.c	131b3b2ea9baac3f2672b734a1fe4e835cc5dc5f
+++ libpurple/cipher.c	2f4817fd21f86ce8ab710174ee2418da1591348a
@@ -2379,7 +2379,7 @@ purple_cipher_digest_region(const gchar 
 	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 @@ purple_cipher_context_set_option(PurpleC
 	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 @@ purple_cipher_context_get_option(PurpleC
 	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 @@ purple_cipher_context_set_iv(PurpleCiphe
 	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 @@ purple_cipher_context_append(PurpleCiphe
 	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 @@ purple_cipher_context_digest(PurpleCiphe
 	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 @@ purple_cipher_context_encrypt(PurpleCiph
 	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 @@ purple_cipher_context_decrypt(PurpleCiph
 	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 @@ purple_cipher_context_set_salt(PurpleCip
 	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 @@ purple_cipher_context_get_salt_size(Purp
 	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 @@ purple_cipher_context_set_key(PurpleCiph
 	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 @@ purple_cipher_context_get_key_size(Purpl
 	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 @@ purple_cipher_context_set_batch_mode(Pur
 	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 @@ purple_cipher_context_get_batch_mode(Pur
 	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 @@ purple_cipher_context_get_block_size(Pur
 	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 @@ purple_cipher_context_set_key_with_len(P
 	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);
 }
 
============================================================
--- libpurple/dnsquery.c	c5dea896243eb2208c7b9e3d6b6b9324926d344a
+++ libpurple/dnsquery.c	9ee9cb81e40e9e195fdc5c16850d17c0d2512b0a
@@ -127,7 +127,7 @@ purple_dnsquery_failed(PurpleDnsQueryDat
 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);
============================================================
--- libpurple/network.c	9dbf78425bad604610fc86ca3c2d91d2c6167c9f
+++ libpurple/network.c	9ecaecb9542db2ca146d8c5c7ba0fd6d03eb27b5
@@ -240,7 +240,7 @@ purple_network_set_upnp_port_mapping_cb(
 	/* 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;
============================================================
--- libpurple/plugin.c	fa337da5e2cf783d2758f26ecf3a90327007ce5c
+++ libpurple/plugin.c	113685cff70d13bcd6d26ac56c66cfd2c1163348
@@ -222,7 +222,7 @@ purple_plugin_probe(const char *filename
 			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;
============================================================
--- libpurple/pluginpref.c	191ac7e98e1f9f2f6d1028d850c32fd153549874
+++ libpurple/pluginpref.c	012457a20a7baa4b472eb09a7d1ce6167177fbb6
@@ -196,7 +196,7 @@ purple_plugin_pref_set_bounds(PurplePlug
 
 	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 @@ void purple_plugin_pref_get_bounds(Purpl
 
 	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;
============================================================
--- libpurple/proxy.c	895e29e05d6a3de70a21248e005918a221174f24
+++ libpurple/proxy.c	6d59c36712283fc72b9b94eae3a801b3a16baa23
@@ -403,7 +403,7 @@ purple_win32_proxy_get_info(void)
 		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 @@ purple_proxy_connect_data_disconnect(Pur
 
 	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 @@ socket_ready_cb(gpointer data, gint sour
 	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));
============================================================
--- libpurple/stun.c	3de844dce7cde79bedb3f0b5d33184777099aa2f
+++ libpurple/stun.c	c2665555c19747a8c365d06cbf2e5c661b5f5013
@@ -116,7 +116,7 @@ static gboolean timeoutfunc(gpointer dat
 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 @@ static void reply_cb(gpointer data, gint
 
 	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 @@ static void reply_cb(gpointer data, gint
 			|| 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;
============================================================
--- libpurple/upnp.c	79164e1109249f6dfa1e42ea106928bc60f406e1
+++ libpurple/upnp.c	078d8ce871c253ca4e304ee8049fa3fb17f5a66b
@@ -807,7 +807,7 @@ looked_up_internal_ip_cb(gpointer data, 
 				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");
 
 }
 
============================================================
--- libpurple/win32/win32dep.c	a397e449182ff2aa412abd0fa54626c811e608e4
+++ libpurple/win32/win32dep.c	debce1ee7b44bb3da17f6296b8a86bde5519560c
@@ -326,7 +326,7 @@ static HKEY _reg_open_key(HKEY rootkey, 
 
 	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 @@ static gboolean _reg_read(HKEY reg_key, 
 
 	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);
 	}


More information about the Commits mailing list