MySpace added a new field, LastImageUpdated. Save it in MsimUser. soc.2007.msimprpl

Fri, 24 Aug 2007 02:29:42 +0000

author
Jeff Connelly <jeff2@soc.pidgin.im>
date
Fri, 24 Aug 2007 02:29:42 +0000
branch
soc.2007.msimprpl
changeset 19530
6ced4ef3e757
parent 19529
e64a036833ed
child 19531
799c0e65f51f

MySpace added a new field, LastImageUpdated. Save it in MsimUser.
Also, allow null session in msim_unrecognized, since sometimes the session
is not conveniently available (such as in msim_store_user_info_each).
Previously, LastImageUpdated was unrecognized and sent to msim_unrecognized
with a null session, which was dereferenced and crashed. Fixed.

libpurple/protocols/myspace/myspace.c file | annotate | diff | comparison | revisions
libpurple/protocols/myspace/myspace.h file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/myspace/myspace.c	Thu Aug 23 06:10:21 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Fri Aug 24 02:29:42 2007 +0000
@@ -1669,8 +1669,8 @@
 	 * by Alexandr Shutko, who maintains OSCAR protocol documentation). */
 
 	purple_debug_info("msim", "Unrecognized data on account for %s\n", 
-			session->account->username ? session->account->username
-			: "(NULL)");
+			(session && session->account && session->account->username) ? 
+			session->account->username : "(NULL)");
 	if (note) {
 		purple_debug_info("msim", "(Note: %s)\n", note);
 	}
@@ -2719,6 +2719,9 @@
 		if (!previous_url || strcmp(previous_url, user->image_url)) {
 			purple_util_fetch_url(user->image_url, TRUE, NULL, TRUE, msim_downloaded_buddy_icon, (gpointer)user);
 		}
+	} else if (!strcmp(key_str, "LastImageUpdated")) {
+		/* TODO: use somewhere */
+		user->last_image_updated = atol(value_str);
 	} else if (!strcmp(key_str, "Headline")) {
 		user->headline = g_strdup(value_str);
 	} else {
--- a/libpurple/protocols/myspace/myspace.h	Thu Aug 23 06:10:21 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.h	Fri Aug 24 02:29:42 2007 +0000
@@ -226,6 +226,7 @@
 	gchar *username;
 	gchar *band_name, *song_name;
 	gchar *image_url;
+	guint last_image_updated;
 } MsimUser;
 
 

mercurial