/soc/2013/ankitkv/gobjectification: 9931e6876a79: Resolve name c...

Ankit Vani a at nevitus.org
Sat Aug 17 15:16:05 EDT 2013


Changeset: 9931e6876a79e14dd4fd651f0ff9b188e311aae0
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-08-18 00:44 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/9931e6876a79

Description:

Resolve name conflicts

diffstat:

 pidgin/gtkconv.c  |   8 ++++----
 pidgin/gtkutils.c |  20 ++++++++++----------
 2 files changed, 14 insertions(+), 14 deletions(-)

diffs (103 lines):

diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -5577,13 +5577,13 @@ conv_dnd_recv(GtkWidget *widget, GdkDrag
 	}
 	else if (info == PIDGIN_DRAG_IM_CONTACT)
 	{
-		char *protocol = NULL;
+		char *protocol_id = NULL;
 		char *username = NULL;
 		PurpleAccount *account;
 		PidginConversation *gtkconv;
 
 		if (pidgin_parse_x_im_contact((const char *) data, FALSE, &account,
-						&protocol, &username, NULL))
+						&protocol_id, &username, NULL))
 		{
 			if (account == NULL)
 			{
@@ -5597,7 +5597,7 @@ conv_dnd_recv(GtkWidget *widget, GdkDrag
 				 */
 				if (PURPLE_IS_CHAT_CONVERSATION(conv) &&
 						protocol && PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(protocol, chat_invite) &&
-						strcmp(purple_account_get_protocol_id(convaccount), protocol) == 0) {
+						strcmp(purple_account_get_protocol_id(convaccount), protocol_id) == 0) {
 					purple_chat_conversation_invite_user(PURPLE_CHAT_CONVERSATION(conv), username, NULL, TRUE);
 				} else {
 					im = purple_im_conversation_new(account, username);
@@ -5611,7 +5611,7 @@ conv_dnd_recv(GtkWidget *widget, GdkDrag
 		}
 
 		g_free(username);
-		g_free(protocol);
+		g_free(protocol_id);
 
 		gtk_drag_finish(dc, TRUE,
 		                gdk_drag_context_get_actions(dc) == GDK_ACTION_MOVE, t);
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -935,9 +935,9 @@ pidgin_parse_x_im_contact(const char *ms
 							PurpleAccount **ret_account, char **ret_protocol,
 							char **ret_username, char **ret_alias)
 {
-	char *protocol = NULL;
-	char *username = NULL;
-	char *alias    = NULL;
+	char *protocol_id = NULL;
+	char *username    = NULL;
+	char *alias       = NULL;
 	char *str;
 	char *s;
 	gboolean valid;
@@ -986,18 +986,18 @@ pidgin_parse_x_im_contact(const char *ms
 			if (!g_ascii_strcasecmp(key, "X-IM-Username:"))
 				username = g_strdup(value);
 			else if (!g_ascii_strcasecmp(key, "X-IM-Protocol:"))
-				protocol = g_strdup(value);
+				protocol_id = g_strdup(value);
 			else if (!g_ascii_strcasecmp(key, "X-IM-Alias:"))
 				alias = g_strdup(value);
 		}
 	}
 
-	if (username != NULL && protocol != NULL)
+	if (username != NULL && protocol_id != NULL)
 	{
 		valid = TRUE;
 
 		*ret_username = username;
-		*ret_protocol = protocol;
+		*ret_protocol = protocol_id;
 
 		if (ret_alias != NULL)
 			*ret_alias = alias;
@@ -1044,15 +1044,15 @@ pidgin_parse_x_im_contact(const char *ms
 
 				protoname = protocol->list_icon(account, NULL);
 
-				if (!strcmp(protoname, protocol))
+				if (!strcmp(protoname, protocol_id))
 					break;
 
 				account = NULL;
 			}
 
 			/* Special case for AIM and ICQ */
-			if (account == NULL && (!strcmp(protocol, "aim") ||
-									!strcmp(protocol, "icq")))
+			if (account == NULL && (!strcmp(protocol_id, "aim") ||
+									!strcmp(protocol_id, "icq")))
 			{
 				for (l = list; l != NULL; l = l->next)
 				{
@@ -1098,7 +1098,7 @@ pidgin_parse_x_im_contact(const char *ms
 		valid = FALSE;
 
 		g_free(username);
-		g_free(protocol);
+		g_free(protocol_id);
 		g_free(alias);
 	}
 



More information about the Commits mailing list