Mercurial > pidgin.yaz
changeset 11076:75be3005640e
[gaim-migrate @ 13086]
I'd left off a null and it caused a crash. Also, I changed the
thing to use vargs, since it will need to use that in the future
anyway, I think.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 09 Jul 2005 20:00:07 +0000 |
parents | 812b285aeccd |
children | 9f526e2e511e |
files | src/account.c src/protocols/yahoo/yahoo.c |
diffstat | 2 files changed, 11 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/account.c Sat Jul 09 19:36:24 2005 +0000 +++ b/src/account.c Sat Jul 09 20:00:07 2005 +0000 @@ -407,15 +407,12 @@ /* Get the active/inactive state */ data = xmlnode_get_attrib(node, "active"); - if (data != NULL) - { - if (strcasecmp(data, "true") == 0) - active = TRUE; - else if (strcasecmp(data, "false") == 0) - active = FALSE; - else - return; - } + if (data == NULL) + return; + if (strcasecmp(data, "true") == 0) + active = TRUE; + else if (strcasecmp(data, "false") == 0) + active = FALSE; else return; @@ -427,8 +424,7 @@ /* QQQ: Need to read attributes into a vargs */ /* QQQ: This needs to do a better job of adding attributes and stuff */ - /* Use gaim_account_set_status_vargs(); */ - gaim_account_set_status(account, type, active); + gaim_account_set_status_vargs(account, type, active, NULL); } static void
--- a/src/protocols/yahoo/yahoo.c Sat Jul 09 19:36:24 2005 +0000 +++ b/src/protocols/yahoo/yahoo.c Sat Jul 09 20:00:07 2005 +0000 @@ -2135,7 +2135,7 @@ GaimConnection *gc = data; struct yahoo_data *yd; struct yahoo_packet *pkt; - + if (!g_list_find(gaim_connections_get_all(), gc)) { close(source); return; @@ -2148,8 +2148,8 @@ yd = gc->proto_data; yd->fd = source; - - pkt = yahoo_packet_new(YAHOO_SERVICE_AUTH, YAHOO_STATUS_AVAILABLE, 0); + + pkt = yahoo_packet_new(YAHOO_SERVICE_AUTH, yd->current_status, 0); yahoo_packet_hash_str(pkt, 1, gaim_normalize(gc->account, gaim_account_get_username(gaim_connection_get_account(gc)))); yahoo_packet_send_and_free(pkt, yd); @@ -2380,7 +2380,7 @@ yd->friends = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, yahoo_friend_free); yd->confs = NULL; yd->conf_id = 2; - + if (!strcmp(id, YAHOO_STATUS_TYPE_AVAILABLE) || !strcmp(id, YAHOO_STATUS_TYPE_ONLINE)) { yd->current_status = YAHOO_STATUS_AVAILABLE; } else if (!strcmp(id, YAHOO_STATUS_TYPE_BRB)) {