pidgin: 4651ec76: Minor formatting and comments

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Jan 29 03:25:27 EST 2009


-----------------------------------------------------------------
Revision: 4651ec76f4efd30b174731a3a92bb1fcbe98281c
Ancestor: c1c61864a18d4cba63f739247b0256842512a8ae
Author: markdoliner at pidgin.im
Date: 2009-01-29T08:23:27
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4651ec76f4efd30b174731a3a92bb1fcbe98281c

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

ChangeLog: 

Minor formatting and comments

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c	308116dd1ce5b765d9bc8b4bf5fab37180d7011c
+++ libpurple/protocols/oscar/oscar.c	bef765c91c916ce9547cb1f0fb6245cb39c4f713
@@ -2143,30 +2143,35 @@ static int purple_parse_oncoming(OscarDa
 	} else {
 		purple_prpl_got_user_status_deactive(account, info->sn, OSCAR_STATUS_ID_MOBILE);
 	}
-	
+
 	if (info->status != NULL && info->status[0] != '\0')
-	/* Grab the available message */
+		/* Grab the available message */
 		message = oscar_encoding_to_utf8(account, info->status_encoding,
 										 info->status, info->status_len);
-	
+
 	tmp2 = tmp = (message ? g_markup_escape_text(message, -1) : NULL);
-	
+
 	if (strcmp(status_id, OSCAR_STATUS_ID_AVAILABLE) == 0) {
 		if (info->itmsurl_encoding && info->itmsurl && info->itmsurl_len)
-		/* Grab the iTunes Music Store URL */
+			/* Grab the iTunes Music Store URL */
 			itmsurl = oscar_encoding_to_utf8(account, info->itmsurl_encoding,
 											 info->itmsurl, info->itmsurl_len);
+
 		if (tmp2 == NULL && itmsurl != NULL)
+			/*
+			 * The message can't be NULL because NULL means it was the
+			 * last attribute, so the itmsurl would get ignored below.
+			 */
 			tmp2 = "";
-		
+
 		purple_prpl_got_user_status(account, info->sn, status_id,
 									"message", tmp2, "itmsurl", itmsurl, NULL);
 	}
 	else
 		purple_prpl_got_user_status(account, info->sn, status_id, "message", tmp2, NULL);
-	
+
 	g_free(tmp);
-	
+
 	g_free(message);
 	g_free(itmsurl);
 


More information about the Commits mailing list