Mercurial > pidgin
comparison src/list.c @ 4444:fd83159169db
[gaim-migrate @ 4719]
ok, i'm done cleaning this for tonight.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 28 Jan 2003 06:51:58 +0000 |
parents | fd53864d880f |
children | a46c57f2d58b |
comparison
equal
deleted
inserted
replaced
4443:00a22e2e8367 | 4444:fd83159169db |
---|---|
766 } else if(!strcmp(element_name, "blist")) { | 766 } else if(!strcmp(element_name, "blist")) { |
767 blist_parser_current_tag = BLIST_TAG_BLIST; | 767 blist_parser_current_tag = BLIST_TAG_BLIST; |
768 } else if(!strcmp(element_name, "group")) { | 768 } else if(!strcmp(element_name, "group")) { |
769 blist_parser_current_tag = BLIST_TAG_GROUP; | 769 blist_parser_current_tag = BLIST_TAG_GROUP; |
770 for(i=0; attribute_names[i]; i++) { | 770 for(i=0; attribute_names[i]; i++) { |
771 if(!strcmp(attribute_names[i], "name")) | 771 if(!strcmp(attribute_names[i], "name")) { |
772 g_free(blist_parser_group_name); | |
772 blist_parser_group_name = g_strdup(attribute_values[i]); | 773 blist_parser_group_name = g_strdup(attribute_values[i]); |
774 } | |
773 } | 775 } |
774 if(blist_parser_group_name) { | 776 if(blist_parser_group_name) { |
775 add_group(blist_parser_group_name); | 777 add_group(blist_parser_group_name); |
776 } | 778 } |
777 } else if(!strcmp(element_name, "person")) { | 779 } else if(!strcmp(element_name, "person")) { |
778 blist_parser_current_tag = BLIST_TAG_PERSON; | 780 blist_parser_current_tag = BLIST_TAG_PERSON; |
779 for(i=0; attribute_names[i]; i++) { | 781 for(i=0; attribute_names[i]; i++) { |
780 if(!strcmp(attribute_names[i], "name")) | 782 if(!strcmp(attribute_names[i], "name")) { |
783 g_free(blist_parser_person_name); | |
781 blist_parser_person_name = g_strdup(attribute_values[i]); | 784 blist_parser_person_name = g_strdup(attribute_values[i]); |
785 } | |
782 } | 786 } |
783 } else if(!strcmp(element_name, "buddy")) { | 787 } else if(!strcmp(element_name, "buddy")) { |
784 blist_parser_current_tag = BLIST_TAG_BUDDY; | 788 blist_parser_current_tag = BLIST_TAG_BUDDY; |
785 for(i=0; attribute_names[i]; i++) { | 789 for(i=0; attribute_names[i]; i++) { |
786 if(!strcmp(attribute_names[i], "account")) | 790 if(!strcmp(attribute_names[i], "account")) { |
791 g_free(blist_parser_account_name); | |
787 blist_parser_account_name = g_strdup(attribute_values[i]); | 792 blist_parser_account_name = g_strdup(attribute_values[i]); |
788 else if(!strcmp(attribute_names[i], "protocol")) | 793 } else if(!strcmp(attribute_names[i], "protocol")) { |
789 blist_parser_account_protocol = atoi(attribute_values[i]); | 794 blist_parser_account_protocol = atoi(attribute_values[i]); |
795 } | |
790 } | 796 } |
791 } else if(!strcmp(element_name, "name")) { | 797 } else if(!strcmp(element_name, "name")) { |
792 blist_parser_current_tag = BLIST_TAG_NAME; | 798 blist_parser_current_tag = BLIST_TAG_NAME; |
793 } else if(!strcmp(element_name, "alias")) { | 799 } else if(!strcmp(element_name, "alias")) { |
794 blist_parser_current_tag = BLIST_TAG_ALIAS; | 800 blist_parser_current_tag = BLIST_TAG_ALIAS; |
795 } else if(!strcmp(element_name, "setting")) { | 801 } else if(!strcmp(element_name, "setting")) { |
796 blist_parser_current_tag = BLIST_TAG_SETTING; | 802 blist_parser_current_tag = BLIST_TAG_SETTING; |
797 for(i=0; attribute_names[i]; i++) { | 803 for(i=0; attribute_names[i]; i++) { |
798 if(!strcmp(attribute_names[i], "name")) | 804 if(!strcmp(attribute_names[i], "name")) { |
805 g_free(blist_parser_setting_name); | |
799 blist_parser_setting_name = g_strdup(attribute_values[i]); | 806 blist_parser_setting_name = g_strdup(attribute_values[i]); |
807 } | |
800 } | 808 } |
801 } else if(!strcmp(element_name, "privacy")) { | 809 } else if(!strcmp(element_name, "privacy")) { |
802 blist_parser_current_tag = BLIST_TAG_PRIVACY; | 810 blist_parser_current_tag = BLIST_TAG_PRIVACY; |
803 } else if(!strcmp(element_name, "account")) { | 811 } else if(!strcmp(element_name, "account")) { |
804 blist_parser_current_tag = BLIST_TAG_ACCOUNT; | 812 blist_parser_current_tag = BLIST_TAG_ACCOUNT; |
805 for(i=0; attribute_names[i]; i++) { | 813 for(i=0; attribute_names[i]; i++) { |
806 if(!strcmp(attribute_names[i], "protocol")) | 814 if(!strcmp(attribute_names[i], "protocol")) |
807 blist_parser_account_protocol = atoi(attribute_values[i]); | 815 blist_parser_account_protocol = atoi(attribute_values[i]); |
808 else if(!strcmp(attribute_names[i], "mode")) | 816 else if(!strcmp(attribute_names[i], "mode")) |
809 blist_parser_privacy_mode = atoi(attribute_values[i]); | 817 blist_parser_privacy_mode = atoi(attribute_values[i]); |
810 else if(!strcmp(attribute_names[i], "name")) | 818 else if(!strcmp(attribute_names[i], "name")) { |
819 g_free(blist_parser_account_name); | |
811 blist_parser_account_name = g_strdup(attribute_values[i]); | 820 blist_parser_account_name = g_strdup(attribute_values[i]); |
821 } | |
812 } | 822 } |
813 } else if(!strcmp(element_name, "permit")) { | 823 } else if(!strcmp(element_name, "permit")) { |
814 blist_parser_current_tag = BLIST_TAG_PERMIT; | 824 blist_parser_current_tag = BLIST_TAG_PERMIT; |
815 } else if(!strcmp(element_name, "block")) { | 825 } else if(!strcmp(element_name, "block")) { |
816 blist_parser_current_tag = BLIST_TAG_BLOCK; | 826 blist_parser_current_tag = BLIST_TAG_BLOCK; |
880 struct aim_user *user = find_user(blist_parser_account_name, | 890 struct aim_user *user = find_user(blist_parser_account_name, |
881 blist_parser_account_protocol); | 891 blist_parser_account_protocol); |
882 if(user) { | 892 if(user) { |
883 gaim_privacy_permit_add(user, blist_parser_buddy_name); | 893 gaim_privacy_permit_add(user, blist_parser_buddy_name); |
884 } | 894 } |
895 blist_parser_current_tag = BLIST_TAG_ACCOUNT; | |
885 g_free(blist_parser_buddy_name); | 896 g_free(blist_parser_buddy_name); |
886 blist_parser_current_tag = BLIST_TAG_ACCOUNT; | 897 blist_parser_buddy_name = NULL; |
887 } else if(!strcmp(element_name, "block")) { | 898 } else if(!strcmp(element_name, "block")) { |
888 struct aim_user *user = find_user(blist_parser_account_name, | 899 struct aim_user *user = find_user(blist_parser_account_name, |
889 blist_parser_account_protocol); | 900 blist_parser_account_protocol); |
890 if(user) { | 901 if(user) { |
891 gaim_privacy_deny_add(user, blist_parser_buddy_name); | 902 gaim_privacy_deny_add(user, blist_parser_buddy_name); |
892 } | 903 } |
904 blist_parser_current_tag = BLIST_TAG_ACCOUNT; | |
893 g_free(blist_parser_buddy_name); | 905 g_free(blist_parser_buddy_name); |
894 blist_parser_current_tag = BLIST_TAG_ACCOUNT; | 906 blist_parser_buddy_name = NULL; |
895 } else if(!strcmp(element_name, "ignore")) { | 907 } else if(!strcmp(element_name, "ignore")) { |
896 /* we'll apparently do something with this later */ | 908 /* we'll apparently do something with this later */ |
897 blist_parser_current_tag = BLIST_TAG_ACCOUNT; | 909 blist_parser_current_tag = BLIST_TAG_ACCOUNT; |
898 } | 910 } |
899 } | 911 } |