pidgin: d8989f30: Clean up some debugging to avoid potenti...

datallah at pidgin.im datallah at pidgin.im
Sun Aug 31 12:58:12 EDT 2008


-----------------------------------------------------------------
Revision: d8989f302a4a0c8ff1cbf7bb951bc3f8461c266d
Ancestor: c93f17d85d0fe07aed434fceeca41166266e5ecf
Author: datallah at pidgin.im
Date: 2008-08-31T16:52:51
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d8989f302a4a0c8ff1cbf7bb951bc3f8461c266d

Modified files:
        libpurple/protocols/oscar/oscar.c

ChangeLog: 

Clean up some debugging to avoid potential NULL string printf.

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c	69d6fd0126ac88eed80d3bf6e8c12aa956f13c66
+++ libpurple/protocols/oscar/oscar.c	0ba974ea1775d0dbe94f86c8e96e936b217acb6f
@@ -1539,14 +1539,16 @@ purple_parse_auth_resp(OscarData *od, Fl
 			break;
 		}
 		purple_debug_info("oscar", "Login Error Code 0x%04hx\n", info->errorcode);
-		purple_debug_info("oscar", "Error URL: %s\n", info->errorurl);
+		purple_debug_info("oscar", "Error URL: %s\n", info->errorurl ? info->errorurl : "");
 		return 1;
 	}
 
-	purple_debug_misc("oscar", "Reg status: %hu\n", info->regstatus);
-	purple_debug_misc("oscar", "Email: %s\n",
-					(info->email != NULL) ? info->email : "null");
-	purple_debug_misc("oscar", "BOSIP: %s\n", info->bosip);
+	purple_debug_misc("oscar", "Reg status: %hu\n"
+							   "Email: %s\n"
+							   "BOSIP: %s\n",
+							   info->regstatus,
+							   info->email ? info->email : "null",
+							   info->bosip ? info->bosip : "null");
 	purple_debug_info("oscar", "Closing auth connection...\n");
 	flap_connection_schedule_destroy(conn, OSCAR_DISCONNECT_DONE, NULL);
 
@@ -1833,7 +1835,7 @@ purple_parse_login(OscarData *od, FlapCo
 	aim_send_login(od, conn, purple_account_get_username(account),
 			purple_connection_get_password(gc), truncate_pass,
 			od->icq ? &icqinfo : &aiminfo, key,
-			/* allow multple logins? */ purple_account_get_bool(account, "allow_multiple_logins", OSCAR_DEFAULT_ALLOW_MULTIPLE_LOGINS));
+			purple_account_get_bool(account, "allow_multiple_logins", OSCAR_DEFAULT_ALLOW_MULTIPLE_LOGINS));
 
 	purple_connection_update_progress(gc, _("Password sent"), 2, OSCAR_CONNECT_STEPS);
 	ck[2] = 0x6c;


More information about the Commits mailing list