Mercurial > pidgin.yaz
changeset 7147:e9867cdeb0fd
[gaim-migrate @ 7714]
better fix for you poor slobs that haven't edited your account in a while
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 04 Oct 2003 21:53:11 +0000 |
parents | 875303d4f004 |
children | 5c03e3e0d451 |
files | src/protocols/jabber/auth.c src/protocols/jabber/jabber.c |
diffstat | 2 files changed, 26 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/jabber/auth.c Sat Oct 04 21:38:54 2003 +0000 +++ b/src/protocols/jabber/auth.c Sat Oct 04 21:53:11 2003 +0000 @@ -293,8 +293,8 @@ g_string_append_printf(response, ",digest-uri=\"xmpp/%s\"", realm); g_string_append_printf(response, ",response=%s", auth_resp); g_string_append_printf(response, ",charset=utf-8"); - g_string_append_printf(response, ",authzid=\"%s\"", - gaim_account_get_username(js->gc->account)); + g_string_append_printf(response, ",authzid=\"%s@%s/%s\"", + js->user->node, js->user->domain, js->user->resource); g_free(auth_resp); g_free(cnonce);
--- a/src/protocols/jabber/jabber.c Sat Oct 04 21:38:54 2003 +0000 +++ b/src/protocols/jabber/jabber.c Sat Oct 04 21:53:11 2003 +0000 @@ -357,12 +357,18 @@ g_free, NULL); js->user = jabber_id_new(gaim_account_get_username(account)); - if(!js->user->node) { - js->user->node = js->user->domain; - js->user->domain = g_strdup("jabber.org"); + if(!js->user->resource) { + char *me; + js->user->resource = g_strdup("Gaim"); + if(!js->user->node) { + js->user->node = js->user->domain; + js->user->domain = g_strdup("jabber.org"); + } + me = g_strdup_printf("%s@%s/%s", js->user->node, js->user->domain, + js->user->resource); + gaim_account_set_username(account, me); + g_free(me); } - if(!js->user->resource) - js->user->resource = g_strdup("Gaim"); server = connect_server[0] ? connect_server : js->user->domain; @@ -628,6 +634,19 @@ g_free, NULL); js->user = jabber_id_new(gaim_account_get_username(account)); + if(!js->user->resource) { + char *me; + js->user->resource = g_strdup("Gaim"); + if(!js->user->node) { + js->user->node = js->user->domain; + js->user->domain = g_strdup("jabber.org"); + } + me = g_strdup_printf("%s@%s/%s", js->user->node, js->user->domain, + js->user->resource); + gaim_account_set_username(account, me); + g_free(me); + } + server = connect_server[0] ? connect_server : js->user->domain; jabber_stream_set_state(js, JABBER_STREAM_CONNECTING);