Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/libymsg.c @ 28332:35f3a79045a6
propagate from branch 'im.pidgin.pidgin' (head f2a545adb2d67a5ba3dce2abedf68c392cc815e1)
to branch 'im.pidgin.cpw.darkrain42.2.6.1' (head 3100186c018974c8e9a25d886213b3317320c5c7)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 05 Aug 2009 01:34:35 +0000 |
parents | 0af4b1fb0566 90b471ba5282 |
children | 901476dc70b9 |
comparison
equal
deleted
inserted
replaced
28331:0af4b1fb0566 | 28332:35f3a79045a6 |
---|---|
476 GSList *l = pkt->hash; | 476 GSList *l = pkt->hash; |
477 | 477 |
478 PurpleAccount *account = purple_connection_get_account(gc); | 478 PurpleAccount *account = purple_connection_get_account(gc); |
479 YahooData *yd = gc->proto_data; | 479 YahooData *yd = gc->proto_data; |
480 GHashTable *ht; | 480 GHashTable *ht; |
481 char *norm_bud = NULL; | 481 char *norm_bud; |
482 char *temp = NULL; | 482 char *temp = NULL; |
483 YahooFriend *f = NULL; /* It's your friends. They're going to want you to share your StarBursts. */ | 483 YahooFriend *f = NULL; /* It's your friends. They're going to want you to share your StarBursts. */ |
484 /* But what if you had no friends? */ | 484 /* But what if you had no friends? */ |
485 PurpleBuddy *b; | 485 PurpleBuddy *b; |
486 PurpleGroup *g; | 486 PurpleGroup *g; |
487 int protocol = 0; | 487 int protocol = 0; |
488 int stealth = 0; | 488 int stealth = 0; |
489 | |
490 | 489 |
491 ht = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_slist_free); | 490 ht = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_slist_free); |
492 | 491 |
493 while (l) { | 492 while (l) { |
494 struct yahoo_pair *pair = l->data; | 493 struct yahoo_pair *pair = l->data; |
544 /* This buddy is on the ignore list (and therefore in no group) */ | 543 /* This buddy is on the ignore list (and therefore in no group) */ |
545 purple_debug_info("yahoo", "%s adding %s to the deny list because of the ignore list / no group was found\n",account->username, norm_bud); | 544 purple_debug_info("yahoo", "%s adding %s to the deny list because of the ignore list / no group was found\n",account->username, norm_bud); |
546 purple_privacy_deny_add(account, norm_bud, 1); | 545 purple_privacy_deny_add(account, norm_bud, 1); |
547 } | 546 } |
548 | 547 |
548 g_free(norm_bud); | |
549 | |
549 protocol = 0; | 550 protocol = 0; |
550 stealth = 0; | 551 stealth = 0; |
551 norm_bud = NULL; | 552 g_free(temp); |
552 temp = NULL; | 553 temp = NULL; |
553 } | 554 } |
554 break; | 555 break; |
555 case 300: /* This is 318 before a group, 319 before any s/n in a group, and 320 before any ignored s/n. */ | 556 case 300: /* This is 318 before a group, 319 before any s/n in a group, and 320 before any ignored s/n. */ |
556 break; | 557 break; |
557 case 65: /* This is the group */ | 558 case 65: /* This is the group */ |
558 g_free(yd->current_list15_grp); | 559 g_free(yd->current_list15_grp); |
559 yd->current_list15_grp = yahoo_string_decode(gc, pair->value, FALSE); | 560 yd->current_list15_grp = yahoo_string_decode(gc, pair->value, FALSE); |
560 break; | 561 break; |
561 case 7: /* buddy's s/n */ | 562 case 7: /* buddy's s/n */ |
563 g_free(temp); | |
562 temp = g_strdup(purple_normalize(account, pair->value)); | 564 temp = g_strdup(purple_normalize(account, pair->value)); |
563 break; | 565 break; |
564 case 241: /* another protocol user */ | 566 case 241: /* another protocol user */ |
565 protocol = strtol(pair->value, NULL, 10); | 567 protocol = strtol(pair->value, NULL, 10); |
566 break; | 568 break; |
592 yd->picture_upload_todo = NULL; | 594 yd->picture_upload_todo = NULL; |
593 } | 595 } |
594 yahoo_set_status(account, purple_account_get_active_status(account)); | 596 yahoo_set_status(account, purple_account_get_active_status(account)); |
595 | 597 |
596 g_hash_table_destroy(ht); | 598 g_hash_table_destroy(ht); |
597 g_free(norm_bud); | |
598 g_free(temp); | 599 g_free(temp); |
599 } | 600 } |
600 | 601 |
601 static void yahoo_process_list(PurpleConnection *gc, struct yahoo_packet *pkt) | 602 static void yahoo_process_list(PurpleConnection *gc, struct yahoo_packet *pkt) |
602 { | 603 { |
2586 struct yahoo_p2p_data *p2p_data; | 2587 struct yahoo_p2p_data *p2p_data; |
2587 struct yahoo_packet *pkt_to_send; | 2588 struct yahoo_packet *pkt_to_send; |
2588 PurpleAccount *account; | 2589 PurpleAccount *account; |
2589 YahooData *yd; | 2590 YahooData *yd; |
2590 | 2591 |
2591 if(!(p2p_data = data)) | 2592 p2p_data = data; |
2592 return ; | |
2593 yd = p2p_data->gc->proto_data; | 2593 yd = p2p_data->gc->proto_data; |
2594 | 2594 |
2595 if(error_message != NULL) { | 2595 if(error_message != NULL) { |
2596 purple_debug_warning("yahoo","p2p: %s\n",error_message); | 2596 purple_debug_warning("yahoo","p2p: %s\n",error_message); |
2597 yahoo_send_p2p_pkt(p2p_data->gc, p2p_data->host_username, 2);/* send p2p init packet with val_13=2 */ | 2597 yahoo_send_p2p_pkt(p2p_data->gc, p2p_data->host_username, 2);/* send p2p init packet with val_13=2 */ |