comparison src/protocols/oscar/ssi.c @ 4333:cc2f780c0505

[gaim-migrate @ 4597] I needed to make gc->login_time set before do_proto_menu was called, so I moved that line into account_online instead of serv_finish_login. serv_finish_login is called directly after account_online, and gc->login_time isn't used for anything anyway, so it shouldn't matter. I use gc->login_time to determine if a gc's protocol actions menu is ready to be drawn or not (should not be draw for accounts that are in the process of signing online). I made the "Show Buddies Awaiting Authorization" thing show something reasonable for when you aren't waiting for authorization from anyone. I swapped the ok and cancel buttons for the search for buddy by information and clear log file so they follow the HIG. I gave the right side of the log viewer a shadowed border. I Robot. I applied a patch from Ryan McCabe that doesn't really do anything for gaim (yet, anyway), but it allows clients using libfaim to call cleansnacs cleanly, which stops a potential build up of SNACs in memory when you don't send an IM for a long period of time. I applied another patch from Mr. McCabe that fixes a potential crash in ssi.c when your buddy list is a few lions short of a pride, if you know what I mean. I re-prettified an authorization dialog or two. The bold stuff and the non-bold stuff got backwardcised somehow. I added support for those messages from the ICQ server. Like the one that tells you not to give your password to anyone when you first signon. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 18 Jan 2003 01:58:00 +0000
parents 7c9f3d0fe8b2
children 051265d35a36
comparison
equal deleted inserted replaced
4332:c8f374cadbd9 4333:cc2f780c0505
635 * @param conn The bos connection for this session. 635 * @param conn The bos connection for this session.
636 * @return Return 0 if no errors, otherwise return the error number. 636 * @return Return 0 if no errors, otherwise return the error number.
637 */ 637 */
638 faim_export int aim_ssi_cleanlist(aim_session_t *sess, aim_conn_t *conn) 638 faim_export int aim_ssi_cleanlist(aim_session_t *sess, aim_conn_t *conn)
639 { 639 {
640 struct aim_ssi_item *cur; 640 struct aim_ssi_item *cur, *next;
641 641
642 /* If there are any buddies directly in the master group, put them in a real group */ 642 /* If there are any buddies directly in the master group, put them in a real group */
643 /* This will kind of mess up if you hit the item limit, but this function isn't too critical */ 643 /* This will kind of mess up if you hit the item limit, but this function isn't too critical */
644 for (cur=sess->ssi.local; cur; cur=cur->next) 644 for (cur=sess->ssi.local; cur; cur=cur->next)
645 if ((cur->type == AIM_SSI_TYPE_BUDDY) && (cur->gid == 0x0000)) 645 if ((cur->type == AIM_SSI_TYPE_BUDDY) && (cur->gid == 0x0000))
646 aim_ssi_addbuddy(sess, conn, cur->name, "orphans", NULL, NULL, NULL, 0); 646 aim_ssi_addbuddy(sess, conn, cur->name, "orphans", NULL, NULL, NULL, 0);
647 647
648 /* Now DESTROY any buddies that are directly in the master group */ 648 /* Now DESTROY any buddies that are directly in the master group */
649 for (cur=sess->ssi.local; cur; cur=cur->next) 649 cur = sess->ssi.local;
650 while (cur) {
651 next = cur->next;
650 if ((cur->type == AIM_SSI_TYPE_BUDDY) && (cur->gid == 0x0000)) 652 if ((cur->type == AIM_SSI_TYPE_BUDDY) && (cur->gid == 0x0000))
651 aim_ssi_delbuddy(sess, conn, cur->name, NULL); 653 aim_ssi_delbuddy(sess, conn, cur->name, NULL);
654 cur = next;
655 }
652 656
653 /* Check if there are empty groups */ 657 /* Check if there are empty groups */
654 for (cur=sess->ssi.local; cur; cur=cur->next) 658 cur = sess->ssi.local;
659 while (cur) {
660 next = cur->next;
655 if (cur->type == AIM_SSI_TYPE_GROUP) { 661 if (cur->type == AIM_SSI_TYPE_GROUP) {
656 aim_tlv_t *tlv = aim_gettlv(cur->data, 0x00c8, 1); 662 aim_tlv_t *tlv = aim_gettlv(cur->data, 0x00c8, 1);
657 if (!cur->data || !tlv || !tlv->length) 663 if (!cur->data || !tlv || !tlv->length)
658 aim_ssi_itemlist_del(&sess->ssi.local, cur); 664 aim_ssi_itemlist_del(&sess->ssi.local, cur);
659 } 665 }
666 cur = next;
667 }
660 668
661 /* Check if the master group is empty */ 669 /* Check if the master group is empty */
662 if ((cur = aim_ssi_itemlist_find(sess->ssi.local, 0x0000, 0x0000)) && (!cur->data)) 670 if ((cur = aim_ssi_itemlist_find(sess->ssi.local, 0x0000, 0x0000)) && (!cur->data))
663 aim_ssi_itemlist_del(&sess->ssi.local, cur); 671 aim_ssi_itemlist_del(&sess->ssi.local, cur);
664 672