Mercurial > pidgin
changeset 19350:8839775bad3e
If a username cannot be looked up in postprocessing, throw up an error.
Closes #2720.
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Thu, 23 Aug 2007 04:43:04 +0000 |
parents | 35da6d99d7f0 |
children | 5461821ac122 |
files | libpurple/protocols/myspace/myspace.c |
diffstat | 1 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c Thu Aug 23 04:41:40 2007 +0000 +++ b/libpurple/protocols/myspace/myspace.c Thu Aug 23 04:43:04 2007 +0000 @@ -3207,7 +3207,7 @@ msim_postprocess_outgoing_cb(MsimSession *session, MsimMessage *userinfo, gpointer data) { - gchar *uid_field_name, *uid_before; + gchar *uid_field_name, *uid_before, *username; guint uid; MsimMessage *msg, *body; @@ -3222,6 +3222,19 @@ uid = msim_msg_get_integer(body, "UserID"); msim_msg_free(body); + username = msim_msg_get_string(msg, "_username"); + + if (!uid) { + gchar *msg; + + msg = g_strdup_printf(_("No such user: %s"), username); + purple_notify_error(NULL, NULL, _("User lookup"), msg); + g_free(msg); + g_free(username); + //msim_msg_free(msg); + return; + } + uid_field_name = msim_msg_get_string(msg, "_uid_field_name"); uid_before = msim_msg_get_string(msg, "_uid_before"); @@ -3238,6 +3251,7 @@ */ g_free(uid_field_name); g_free(uid_before); + g_free(username); //msim_msg_free(msg); }