Mercurial > pidgin
comparison libpurple/protocols/myspace/myspace.c @ 19659:15cb06e2d387
merge of 'cce02af7eb2fb114cb0f640979554b7de3a80e96'
and 'db5ad5300e844751f9abf8702f4e4a8369dfef8e'
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Thu, 06 Sep 2007 05:58:52 +0000 |
parents | 9968fff36e20 941965d6fd88 |
children | 3617681a2694 |
comparison
equal
deleted
inserted
replaced
19629:9968fff36e20 | 19659:15cb06e2d387 |
---|---|
930 msg = (MsimMessage *)data; | 930 msg = (MsimMessage *)data; |
931 g_return_if_fail(msg != NULL); | 931 g_return_if_fail(msg != NULL); |
932 | 932 |
933 username = msim_msg_get_string(msg, "user"); | 933 username = msim_msg_get_string(msg, "user"); |
934 if (!username) { | 934 if (!username) { |
935 purple_debug_info("msim", "msim_get_info_cb: no 'user' in msg"); | 935 purple_debug_info("msim", "msim_get_info_cb: no 'user' in msg\n"); |
936 return; | 936 return; |
937 } | 937 } |
938 | 938 |
939 msim_msg_free(msg); | 939 msim_msg_free(msg); |
940 purple_debug_info("msim", "msim_get_info_cb: got for user: %s\n", username); | 940 purple_debug_info("msim", "msim_get_info_cb: got for user: %s\n", username); |
1118 "sesskey", MSIM_TYPE_INTEGER, session->sesskey, | 1118 "sesskey", MSIM_TYPE_INTEGER, session->sesskey, |
1119 "statstring", MSIM_TYPE_STRING, statstring, | 1119 "statstring", MSIM_TYPE_STRING, statstring, |
1120 "locstring", MSIM_TYPE_STRING, g_strdup(""), | 1120 "locstring", MSIM_TYPE_STRING, g_strdup(""), |
1121 NULL)) | 1121 NULL)) |
1122 { | 1122 { |
1123 purple_debug_info("msim", "msim_set_status: failed to set status"); | 1123 purple_debug_info("msim", "msim_set_status: failed to set status\n"); |
1124 } | 1124 } |
1125 | 1125 |
1126 } | 1126 } |
1127 | 1127 |
1128 /** After a uid is resolved to username, tag it with the username and submit for processing. | 1128 /** After a uid is resolved to username, tag it with the username and submit for processing. |
1180 | 1180 |
1181 buddies = purple_find_buddies(session->account, NULL); | 1181 buddies = purple_find_buddies(session->account, NULL); |
1182 | 1182 |
1183 if (!buddies) | 1183 if (!buddies) |
1184 { | 1184 { |
1185 purple_debug_info("msim", "msim_uid2username_from_blist: no buddies?"); | 1185 purple_debug_info("msim", "msim_uid2username_from_blist: no buddies?\n"); |
1186 return NULL; | 1186 return NULL; |
1187 } | 1187 } |
1188 | 1188 |
1189 ret = NULL; | 1189 ret = NULL; |
1190 | 1190 |
1540 | 1540 |
1541 /* Additional post-connect operations */ | 1541 /* Additional post-connect operations */ |
1542 | 1542 |
1543 | 1543 |
1544 if (msim_msg_get_integer(msg, "uniquenick") == session->userid) { | 1544 if (msim_msg_get_integer(msg, "uniquenick") == session->userid) { |
1545 purple_debug_info("msim_we_are_logged_on", "TODO: pick username"); | 1545 purple_debug_info("msim_we_are_logged_on", "TODO: pick username\n"); |
1546 /* No username is set. */ | 1546 /* No username is set. */ |
1547 purple_notify_error(session->account, | 1547 purple_notify_error(session->account, |
1548 _("No username set"), | 1548 _("No username set"), |
1549 _("Please go to http://editprofile.myspace.com/index.cfm?fuseaction=profile.username and choose a username and try to login again."), NULL); | 1549 _("Please go to http://editprofile.myspace.com/index.cfm?fuseaction=profile.username and choose a username and try to login again."), NULL); |
1550 purple_connection_error(session->gc, _("No username set")); | 1550 purple_connection_error(session->gc, _("No username set")); |
1785 full_errmsg, NULL); | 1785 full_errmsg, NULL); |
1786 | 1786 |
1787 /* Destroy session if fatal. */ | 1787 /* Destroy session if fatal. */ |
1788 if (msim_msg_get(msg, "fatal")) { | 1788 if (msim_msg_get(msg, "fatal")) { |
1789 purple_debug_info("msim", "fatal error, closing\n"); | 1789 purple_debug_info("msim", "fatal error, closing\n"); |
1790 if (err == 260) { | |
1791 /* Incorrect password */ | |
1792 session->gc->wants_to_die = TRUE; | |
1793 if (!purple_account_get_remember_password(session->account)) | |
1794 purple_account_set_password(session->account, NULL); | |
1795 } | |
1790 purple_connection_error(session->gc, full_errmsg); | 1796 purple_connection_error(session->gc, full_errmsg); |
1791 } | 1797 } else { |
1798 purple_notify_error(session->account, g_strdup(_("MySpaceIM Error")), | |
1799 full_errmsg, NULL); | |
1800 } | |
1801 | |
1802 g_free(full_errmsg); | |
1792 | 1803 |
1793 return TRUE; | 1804 return TRUE; |
1794 } | 1805 } |
1795 | 1806 |
1796 /** | 1807 /** |