--- a/libpurple/protocols/myspace/myspace.c Wed Feb 25 20:03:08 2009 +0000 +++ b/libpurple/protocols/myspace/myspace.c Mon Mar 02 04:18:40 2009 +0000 @@ -1153,7 +1153,11 @@ break; case MSIM_CONTACT_LIST_INITIAL_FRIENDS: - /* Nothing */ + /* The session is now set up, ready to be connected. This emits the + * signedOn signal, so clients can now do anything with msimprpl, and + * we're ready for it (session key, userid, username all setup). */ + purple_connection_update_progress(session->gc, _("Connected"), 3, 4); + purple_connection_set_state(session->gc, PURPLE_CONNECTED); break; } @@ -1192,12 +1196,6 @@ /* Set display name to username (otherwise will show email address) */ purple_connection_set_display_name(session->gc, session->username); - /* The session is now set up, ready to be connected. This emits the - * signedOn signal, so clients can now do anything with msimprpl, and - * we're ready for it (session key, userid, username all setup). */ - purple_connection_update_progress(session->gc, _("Connected"), 3, 4); - purple_connection_set_state(session->gc, PURPLE_CONNECTED); - body = msim_msg_new( "UserID", MSIM_TYPE_INTEGER, session->userid, NULL); @@ -3124,8 +3122,8 @@ body = msim_msg_get_dictionary(reply, "body"); g_return_if_fail(body != NULL); completed = msim_msg_get_string(body, "Completed"); - g_return_if_fail(body != NULL); msim_msg_free(body); + g_return_if_fail(completed != NULL); if (!g_str_equal(completed, "True")) { purple_debug_info("msim_import_friends_cb",