comparison src/account.c @ 5953:bc71bd31c223

[gaim-migrate @ 6397] More checking for empty strings during account loading. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 25 Jun 2003 03:40:03 +0000
parents a4f2aba0848d
children 2d34c02d2031
comparison
equal deleted inserted replaced
5952:a6f7d4f01981 5953:bc71bd31c223
839 839
840 data->protocol_id = NULL; 840 data->protocol_id = NULL;
841 } 841 }
842 } 842 }
843 else if (data->tag == TAG_PASSWORD) { 843 else if (data->tag == TAG_PASSWORD) {
844 if (strcmp(buffer, "")) { 844 if (*buffer != '\0') {
845 if (data->in_proxy) { 845 if (data->in_proxy) {
846 gaim_proxy_info_set_password(data->proxy_info, buffer); 846 gaim_proxy_info_set_password(data->proxy_info, buffer);
847 } 847 }
848 else { 848 else {
849 gaim_account_set_password(data->account, buffer); 849 gaim_account_set_password(data->account, buffer);
850 gaim_account_set_remember_password(data->account, TRUE); 850 gaim_account_set_remember_password(data->account, TRUE);
851 } 851 }
852 } 852 }
853 } 853 }
854 else if (data->tag == TAG_ALIAS) 854 else if (data->tag == TAG_ALIAS) {
855 gaim_account_set_alias(data->account, buffer); 855 if (*buffer != '\0')
856 else if (data->tag == TAG_USERINFO) 856 gaim_account_set_alias(data->account, buffer);
857 gaim_account_set_user_info(data->account, buffer); 857 }
858 else if (data->tag == TAG_BUDDYICON) 858 else if (data->tag == TAG_USERINFO) {
859 gaim_account_set_buddy_icon(data->account, buffer); 859 if (*buffer != '\0')
860 gaim_account_set_user_info(data->account, buffer);
861 }
862 else if (data->tag == TAG_BUDDYICON) {
863 if (*buffer != '\0')
864 gaim_account_set_buddy_icon(data->account, buffer);
865 }
860 else if (data->tag == TAG_TYPE) { 866 else if (data->tag == TAG_TYPE) {
861 if (data->in_proxy) { 867 if (data->in_proxy) {
862 if (!strcmp(buffer, "global")) 868 if (!strcmp(buffer, "global"))
863 gaim_proxy_info_set_type(data->proxy_info, 869 gaim_proxy_info_set_type(data->proxy_info,
864 GAIM_PROXY_USE_GLOBAL); 870 GAIM_PROXY_USE_GLOBAL);
874 "information for %s\n", 880 "information for %s\n",
875 gaim_account_get_username(data->account)); 881 gaim_account_get_username(data->account));
876 } 882 }
877 } 883 }
878 else if (data->tag == TAG_HOST) { 884 else if (data->tag == TAG_HOST) {
879 if (data->in_proxy && strcmp(buffer, "")) 885 if (data->in_proxy && *buffer != '\0')
880 gaim_proxy_info_set_host(data->proxy_info, buffer); 886 gaim_proxy_info_set_host(data->proxy_info, buffer);
881 } 887 }
882 else if (data->tag == TAG_PORT) { 888 else if (data->tag == TAG_PORT) {
883 if (data->in_proxy && strcmp(buffer, "")) 889 if (data->in_proxy && *buffer != '\0')
884 gaim_proxy_info_set_port(data->proxy_info, atoi(buffer)); 890 gaim_proxy_info_set_port(data->proxy_info, atoi(buffer));
885 } 891 }
886 else if (data->tag == TAG_SETTING) { 892 else if (data->tag == TAG_SETTING) {
887 if (strcmp(buffer, "")) { 893 if (*buffer != '\0') {
888 if (data->setting_ui != NULL) { 894 if (data->setting_ui != NULL) {
889 if (data->setting_type == GAIM_PREF_STRING) 895 if (data->setting_type == GAIM_PREF_STRING)
890 gaim_account_set_ui_string(data->account, data->setting_ui, 896 gaim_account_set_ui_string(data->account, data->setting_ui,
891 data->setting_name, buffer); 897 data->setting_name, buffer);
892 else if (data->setting_type == GAIM_PREF_INT) 898 else if (data->setting_type == GAIM_PREF_INT)
918 924
919 if (gaim_proxy_info_get_type(data->proxy_info) == GAIM_PROXY_NONE) { 925 if (gaim_proxy_info_get_type(data->proxy_info) == GAIM_PROXY_NONE) {
920 gaim_proxy_info_destroy(data->proxy_info); 926 gaim_proxy_info_destroy(data->proxy_info);
921 data->proxy_info = NULL; 927 data->proxy_info = NULL;
922 } 928 }
923 else if (strcmp(buffer, "")) { 929 else if (*buffer != '\0') {
924 gaim_account_set_proxy_info(data->account, data->proxy_info); 930 gaim_account_set_proxy_info(data->account, data->proxy_info);
925 } 931 }
926 } 932 }
927 else if (!strcmp(element_name, "settings")) { 933 else if (!strcmp(element_name, "settings")) {
928 if (data->setting_ui != NULL) { 934 if (data->setting_ui != NULL) {