pidgin.next.major: 7072b425: Remove the _purple_oscar_convert(). It ...

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Mar 17 03:47:15 EDT 2011


----------------------------------------------------------------------
Revision: 7072b4259dd370ca7b78412294a74cc0d9de1f33
Parent:   60115eba916f79b12e941bfe02b1adf863004315
Author:   markdoliner at pidgin.im
Date:     03/17/11 03:39:33
Branch:   im.pidgin.pidgin.next.major
URL: http://d.pidgin.im/viewmtn/revision/info/7072b4259dd370ca7b78412294a74cc0d9de1f33

Changelog: 

Remove the _purple_oscar_convert().  It existed to migrate data from
prpl-oscar to prpl-aim and prpl-icq.  Fixes #2923

Changes against parent 60115eba916f79b12e941bfe02b1adf863004315

  patched  libpurple/account.c
  patched  libpurple/blist.c
  patched  libpurple/pounce.c
  patched  libpurple/savedstatuses.c
  patched  libpurple/util.c
  patched  libpurple/util.h

-------------- next part --------------
============================================================
--- libpurple/util.c	be4a91e070c6e30f7d015e5a7c94790fa1ff3fe9
+++ libpurple/util.c	99f6f6f2832ee616a10cbdf76757d90b9b5c7f16
@@ -4941,18 +4941,6 @@ purple_escape_filename(const char *str)
 	return buf;
 }
 
-const char *_purple_oscar_convert(const char *act, const char *protocol)
-{
-	if (act && purple_strequal(protocol, "prpl-oscar")) {
-		int i;
-		for (i = 0; act[i] != '\0'; i++)
-			if (!isdigit(act[i]))
-				return "prpl-aim";
-		return "prpl-icq";
-	}
-	return protocol;
-}
-
 void purple_restore_default_signal_handlers(void)
 {
 #ifndef _WIN32
============================================================
--- libpurple/pounce.c	d82d02a6e5157e83bf37b24527ff8cfbd6dfc353
+++ libpurple/pounce.c	857c3289e668ad7f9d94e13f97d70adbde47a839
@@ -405,12 +405,8 @@ end_element_handler(GMarkupParseContext 
 	}
 
 	if (purple_strequal(element_name, "account")) {
-		char *tmp;
 		g_free(data->account_name);
 		data->account_name = g_strdup(buffer);
-		tmp = data->protocol_id;
-		data->protocol_id = g_strdup(_purple_oscar_convert(buffer, tmp));
-		g_free(tmp);
 	}
 	else if (purple_strequal(element_name, "pouncee")) {
 		g_free(data->pouncee);
============================================================
--- libpurple/util.h	b0a8b9c4a88d6721a8874a5731ca2f6c3768814d
+++ libpurple/util.h	04484bb60ffde1eb2a6d1a51eda3c0848c96b2ef
@@ -1450,16 +1450,6 @@ const char *purple_escape_filename(const
 const char *purple_escape_filename(const char *str);
 
 /**
- * This is added temporarily to assist the split of oscar into aim and icq.
- * This should not be used by plugins.
- *
- * @deprecated This function should not be used in new code and should be
- *             removed in 3.0.0.  The aim/icq prpl split happened a long
- *             time ago, and we don't need to keep migrating old data.
- */
-const char *_purple_oscar_convert(const char *act, const char *protocol);
-
-/**
  * Restore default signal handlers for signals which might reasonably have
  * handlers. This should be called by a fork()'d child process, since child processes
  * inherit the handlers of the parent.
============================================================
--- libpurple/blist.c	2ca4596c2ca7f986298bd6037d31425976a2a5b2
+++ libpurple/blist.c	b9ccf050f3cb57ad51d52b5cc2237fc291dbe392
@@ -465,9 +465,7 @@ parse_buddy(PurpleGroup *group, PurpleCo
 
 	acct_name = xmlnode_get_attrib(bnode, "account");
 	protocol = xmlnode_get_attrib(bnode, "protocol");
-	protocol = _purple_oscar_convert(acct_name, protocol); /* XXX: Remove */
 	proto = xmlnode_get_attrib(bnode, "proto");
-	proto = _purple_oscar_convert(acct_name, proto); /* XXX: Remove */
 
 	if (!acct_name || (!proto && !protocol))
 		return;
============================================================
--- libpurple/account.c	ae1bbe60d7f44c53c7d2d37a4136cf40b3e340ee
+++ libpurple/account.c	08a9f12ce9ab90d7c10666e94b7f5f1c53903180
@@ -871,7 +871,7 @@ parse_account(xmlnode *node)
 		return NULL;
 	}
 
-	ret = purple_account_new(name, _purple_oscar_convert(name, protocol_id)); /* XXX: */
+	ret = purple_account_new(name, protocol_id);
 	g_free(name);
 	g_free(protocol_id);
 
============================================================
--- libpurple/savedstatuses.c	c9af476df86d345fecfdbc23d84b60a2ac8b1aeb
+++ libpurple/savedstatuses.c	115d99392e191c50bac181448aa5ddf5ff0513ea
@@ -387,7 +387,6 @@ parse_substatus(xmlnode *substatus)
 		const char *protocol;
 		acct_name = xmlnode_get_data(node);
 		protocol = xmlnode_get_attrib(node, "protocol");
-		protocol = _purple_oscar_convert(acct_name, protocol); /* XXX: Remove */
 		if ((acct_name != NULL) && (protocol != NULL))
 			ret->account = purple_accounts_find(acct_name, protocol);
 		g_free(acct_name);


More information about the Commits mailing list