merge of 'b26db53e5b669d0190eefd30126e71200342582a'

Mon, 08 Dec 2008 17:19:52 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Mon, 08 Dec 2008 17:19:52 +0000
changeset 25130
ec79ad131ab1
parent 25087
b26db53e5b66 (current diff)
parent 25129
476e928f6127 (diff)
child 25131
5839c60313a5

merge of 'b26db53e5b669d0190eefd30126e71200342582a'
and '476e928f61270b4031a24898e6b3580de96e2ebf'

--- a/libpurple/protocols/bonjour/bonjour.c	Mon Dec 08 02:22:59 2008 +0000
+++ b/libpurple/protocols/bonjour/bonjour.c	Mon Dec 08 17:19:52 2008 +0000
@@ -376,20 +376,20 @@
 	}
 
 	/* Only show first/last name if there is a nickname set (to avoid duplication) */
-	if (bb->nick != NULL) {
-		if (bb->first != NULL)
+	if (bb->nick != NULL && *bb->nick != '\0') {
+		if (bb->first != NULL && *bb->first != '\0')
 			purple_notify_user_info_add_pair(user_info, _("First name"), bb->first);
-		if (bb->first != NULL)
+		if (bb->last != NULL && *bb->last != '\0')
 			purple_notify_user_info_add_pair(user_info, _("Last name"), bb->last);
 	}
 
-	if (bb->email != NULL)
+	if (bb->email != NULL && *bb->email != '\0')
 		purple_notify_user_info_add_pair(user_info, _("Email"), bb->email);
 
-	if (bb->AIM != NULL)
+	if (bb->AIM != NULL && *bb->AIM != '\0')
 		purple_notify_user_info_add_pair(user_info, _("AIM Account"), bb->AIM);
 
-	if (bb->jid!= NULL)
+	if (bb->jid != NULL && *bb->jid != '\0')
 		purple_notify_user_info_add_pair(user_info, _("XMPP Account"), bb->jid);
 }
 
--- a/libpurple/protocols/bonjour/buddy.c	Mon Dec 08 02:22:59 2008 +0000
+++ b/libpurple/protocols/bonjour/buddy.c	Mon Dec 08 17:19:52 2008 +0000
@@ -161,7 +161,7 @@
 	name = purple_buddy_get_name(buddy);
 
 	/* Create the alias for the buddy using the first and the last name */
-	if (bonjour_buddy->nick)
+	if (bonjour_buddy->nick && *bonjour_buddy->nick)
 		serv_got_alias(purple_account_get_connection(account), name, bonjour_buddy->nick);
 	else {
 		gchar *alias = NULL;

mercurial