changeset 27659:993483dda1b8

Clean up some debugging and leave it in, since when it it fails, it would cause a crash. Refs #4829.
author Paul Aurich <paul@darkrain42.org>
date Tue, 21 Jul 2009 15:05:00 +0000
parents 29e1cc634466
children 6fb92f458b79
files libpurple/protocols/oscar/family_icbm.c libpurple/protocols/oscar/peer.c
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_icbm.c	Tue Jul 21 06:48:31 2009 +0000
+++ b/libpurple/protocols/oscar/family_icbm.c	Tue Jul 21 15:05:00 2009 +0000
@@ -910,6 +910,9 @@
 	GSList *outer_tlvlist = NULL, *inner_tlvlist = NULL;
 	ByteStream hdrbs;
 
+	g_return_if_fail(bn != NULL);
+	g_return_if_fail(ip != NULL);
+
 	conn = flap_connection_findbygroup(od, SNAC_FAMILY_ICBM);
 	if (conn == NULL)
 		return;
--- a/libpurple/protocols/oscar/peer.c	Tue Jul 21 06:48:31 2009 +0000
+++ b/libpurple/protocols/oscar/peer.c	Tue Jul 21 15:05:00 2009 +0000
@@ -712,10 +712,10 @@
 	{
 		const guchar *ip_atoi = purple_network_ip_atoi(listener_ip);
 		if (ip_atoi == NULL) {
-			purple_debug_error("oscar", "Cannot send file. IP %s failed atoi.\n"
+			purple_debug_error("oscar", "Cannot send file. atoi(%s) failed.\n"
 					"Other possibly useful information: fd = %d, port = %d\n",
-			                   listener_ip ? listener_ip : "(null!)", conn->listenerfd,
-							   listener_port);
+					listener_ip ? listener_ip : "(null!)", conn->listenerfd,
+					listener_port);
 			purple_xfer_cancel_local(conn->xfer);
 			return;
 		}