# HG changeset patch # User Jeffrey Connelly # Date 1187922582 0 # Node ID af0e77c446673bbb13ee14d05cb0fd7b076ad36a # Parent 93f01e37d9f11f74fa69c98511d444d51a72b908 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. diff -r 93f01e37d9f1 -r af0e77c44667 libpurple/protocols/myspace/myspace.c --- 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 { diff -r 93f01e37d9f1 -r af0e77c44667 libpurple/protocols/myspace/myspace.h --- 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;