Mercurial > pidgin
diff src/protocols/yahoo/yahoo_filexfer.c @ 13849:8d1c55309e3c
[gaim-migrate @ 16306]
Keep track of the Yahoo! IMVironment specified by the people we're
IMing with. When we reply to their IMs, we now send the same IMVironment
instead of always sending an empty IMVironment because sending an
empty IMVironment would reset their IMVironment back to nothing.
This shouldn't negatively affect the Doodle stuff... but it didn't
work for me when I tested it, so it's hard to tell.
This is a change I made while at Meebo
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 22 Jun 2006 06:26:38 +0000 |
parents | 967ef719cb62 |
children | b7e4180af1db |
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo_filexfer.c Wed Jun 21 15:19:28 2006 +0000 +++ b/src/protocols/yahoo/yahoo_filexfer.c Thu Jun 22 06:26:38 2006 +0000 @@ -481,14 +481,18 @@ char *to = NULL; char *msg = NULL; char *url = NULL; + char *imv = NULL; long expires = 0; GaimXfer *xfer; + struct yahoo_data *yd; struct yahoo_xfer_data *xfer_data; char *service = NULL; char *filename = NULL; unsigned long filesize = 0L; GSList *l; + yd = gc->proto_data; + for (l = pkt->hash; l; l = l->next) { struct yahoo_pair *pair = l->data; @@ -508,6 +512,17 @@ filesize = atol(pair->value); if (pair->key == 49) service = pair->value; + if (pair->key == 63) + imv = pair->value; + } + + /* + * The remote user has changed their IMVironment. We + * record it for later use. + */ + if (from && imv && service && (strcmp("IMVIRONMENT", service) == 0)) { + g_hash_table_replace(yd->imvironments, g_strdup(from), g_strdup(imv)); + return; } if (pkt->service == YAHOO_SERVICE_P2PFILEXFER) {