Mercurial > pidgin
comparison src/protocols/yahoo/yahoo.c @ 3020:c3a29bd2a2d7
[gaim-migrate @ 3033]
Fixes a segfault in Yahoo, and a disconnection error in MSN.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 07 Mar 2002 18:53:37 +0000 |
parents | 304e8c376472 |
children | 18f0e61a6caf |
comparison
equal
deleted
inserted
replaced
3019:304e8c376472 | 3020:c3a29bd2a2d7 |
---|---|
494 else | 494 else |
495 serv_got_typing_stopped(gc, from); | 495 serv_got_typing_stopped(gc, from); |
496 } else if (!g_strncasecmp(msg, "GAME", strlen("GAME"))) { | 496 } else if (!g_strncasecmp(msg, "GAME", strlen("GAME"))) { |
497 struct buddy *bud = find_buddy(gc, from); | 497 struct buddy *bud = find_buddy(gc, from); |
498 void *free1=NULL, *free2=NULL; | 498 void *free1=NULL, *free2=NULL; |
499 if (!bud) | 499 if (!bud) |
500 debug_printf("%s is playing a game, and doesn't want you to know.\n"); | 500 debug_printf("%s is playing a game, and doesn't want you to know.\n"); |
501 if (*stat == '1') { | 501 if (*stat == '1') { |
502 if (g_hash_table_lookup_extended (yd->games, from, free1, free2)) { | 502 if (g_hash_table_lookup_extended (yd->games, from, free1, free2)) { |
503 g_free(free1); | 503 g_free(free1); |
504 g_free(free2); | 504 g_free(free2); |
505 } | 505 } |
506 g_hash_table_insert (yd->games, g_strdup(from), g_strdup(game)); | 506 g_hash_table_insert (yd->games, g_strdup(from), g_strdup(game)); |
507 serv_got_update(gc, from, 1, 0, 0, 0, bud->uc | YAHOO_STATUS_GAME, 0); | 507 if (bud) |
508 serv_got_update(gc, from, 1, 0, 0, 0, bud->uc | YAHOO_STATUS_GAME, 0); | |
508 } else { | 509 } else { |
509 if (g_hash_table_lookup_extended (yd->games, from, free1, free2)) { | 510 if (g_hash_table_lookup_extended (yd->games, from, free1, free2)) { |
510 g_free(free1); | 511 g_free(free1); |
511 g_free(free2); | 512 g_free(free2); |
512 g_hash_table_remove (yd->games, from); | 513 g_hash_table_remove (yd->games, from); |
513 } | 514 } |
514 serv_got_update(gc, from, 1, 0, 0, 0, bud->uc & ~YAHOO_STATUS_GAME, 0); | 515 if (bud) |
516 serv_got_update(gc, from, 1, 0, 0, 0, bud->uc & ~YAHOO_STATUS_GAME, 0); | |
515 } | 517 } |
516 } | 518 } |
517 } | 519 } |
518 | 520 |
519 static void yahoo_process_message(struct gaim_connection *gc, struct yahoo_packet *pkt) | 521 static void yahoo_process_message(struct gaim_connection *gc, struct yahoo_packet *pkt) |