pidgin: f276f730: Clean up a case of unnecessarily duplica...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Fri Jul 17 19:55:36 EDT 2009


-----------------------------------------------------------------
Revision: f276f730c0a3584d3e8c1ee6dc1119e23809b362
Ancestor: bceb2e82690de2be4ff9fba2485dbacba0325a98
Author: rekkanoryo at pidgin.im
Date: 2009-07-17T23:45:52
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f276f730c0a3584d3e8c1ee6dc1119e23809b362

Modified files:
        libpurple/protocols/yahoo/libymsg.c

ChangeLog: 

Clean up a case of unnecessarily duplicated code.

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/libymsg.c	361983f686856c948c79894565269ea32ff84026
+++ libpurple/protocols/yahoo/libymsg.c	902bae057d588259a0fe9ac0c64150a055682084
@@ -1623,28 +1623,18 @@ static void yahoo_auth16_stage3(PurpleCo
 
 	purple_debug_info("yahoo", "yahoo status: %d\n", yd->current_status);
 	pkt = yahoo_packet_new(YAHOO_SERVICE_AUTHRESP, yd->current_status, yd->session_id);
-	if(yd->jp) {
-		yahoo_packet_hash(pkt, "ssssssss",
-					1, name,
-					0, name,
-					277, yd->cookie_y,
-					278, yd->cookie_t,
-					307, base64_string,
-					2, name,
-					2, "1",
-					135, YAHOOJP_CLIENT_VERSION);
-	} else	{
-		yahoo_packet_hash(pkt, "sssssssss",
-					1, name,
-					0, name,
-					277, yd->cookie_y,
-					278, yd->cookie_t,
-					307, base64_string,
-					244, YAHOO_CLIENT_VERSION_ID,
-					2, name,
-					2, "1",
-					135, YAHOO_CLIENT_VERSION);
-	}
+	
+	yahoo_packet_hash(pkt, "sssssssss",
+				1, name,
+				0, name,
+				277, yd->cookie_y,
+				278, yd->cookie_t,
+				307, base64_string,
+				244, yd->jp ? YAHOOJP_CLIENT_VERSION_ID : YAHOO_CLIENT_VERSION_ID,
+				2, name,
+				2, "1",
+				135, yd->jp ? YAHOOJP_CLIENT_VERSION : YAHOO_CLIENT_VERSION);
+
 	if (yd->picture_checksum)
 		yahoo_packet_hash_int(pkt, 192, yd->picture_checksum);
 	yahoo_packet_send_and_free(pkt, yd);


More information about the Commits mailing list