Overview
Comment: | Removed attempts to set lc_errno to NONE |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
8e434a0cbf863a310c614d99070856ca |
User & Date: | rkeene on 2006-12-17 03:48:05 |
Other Links: | manifest | tags |
Context
2006-12-17
| ||
15:30 | Updated documentation to reflect addition of addr and hostname var types Updated addr and hostname types to be in network byte order check-in: 495af83ca7 user: rkeene tags: trunk | |
03:48 | Removed attempts to set lc_errno to NONE check-in: 8e434a0cbf user: rkeene tags: trunk | |
03:35 | Added working addr and ipv4 conversion functions check-in: 525f68fcf8 user: rkeene tags: trunk | |
Changes
Modified libconfig.c from [ccb1bb4c78] to [b750f5ace4].
434 434 } else { 435 435 localvar = NULL; 436 436 } 437 437 438 438 switch (handler->mode) { 439 439 case LC_MODE_CALLBACK: 440 440 if (handler->callback != NULL) { 441 - lc_errno = LC_ERR_NONE; 442 - lc_err_usererrmsg = NULL; 443 - 444 441 retval = handler->callback(localvar, var, varargs, value, flags, handler->extra); 445 442 if (retval < 0) { 446 443 lc_errno = LC_ERR_CALLBACK; 447 444 } 445 + 448 446 return(retval); 449 447 } 450 448 break; 451 449 case LC_MODE_VAR: 452 450 return(lc_handle_type(handler->type, value, handler->data)); 453 451 break; 454 452 } ................................................................................ 808 806 } 809 807 810 808 811 809 int lc_process_var(const char *var, const char *varargs, const char *value, lc_flags_t flags) { 812 810 struct lc_varhandler_st *handler = NULL; 813 811 const char *lastcomponent_handler = NULL, *lastcomponent_var = NULL; 814 812 815 - lc_errno = LC_ERR_NONE; 816 - lc_err_usererrmsg = NULL; 817 - 818 813 lastcomponent_var = strrchr(var, '.'); 819 814 if (lastcomponent_var == NULL) { 820 815 lastcomponent_var = var; 821 816 } else { 822 817 lastcomponent_var++; 823 818 } 824 819 ................................................................................ 860 855 861 856 return(-1); 862 857 } 863 858 864 859 int lc_register_callback(const char *var, char opt, lc_var_type_t type, int (*callback)(const char *, const char *, const char *, const char *, lc_flags_t, void *), void *extra) { 865 860 struct lc_varhandler_st *newhandler = NULL; 866 861 867 - lc_errno = LC_ERR_NONE; 868 - lc_err_usererrmsg = NULL; 869 - 870 862 newhandler = malloc(sizeof(*newhandler)); 871 863 872 864 if (newhandler == NULL) { 873 865 return(-1); 874 866 } 875 867 876 868 if (var == NULL) { ................................................................................ 889 881 890 882 return(0); 891 883 } 892 884 893 885 int lc_register_var(const char *var, lc_var_type_t type, void *data, char opt) { 894 886 struct lc_varhandler_st *newhandler = NULL; 895 887 896 - lc_errno = LC_ERR_NONE; 897 - lc_err_usererrmsg = NULL; 898 - 899 888 newhandler = malloc(sizeof(*newhandler)); 900 889 901 890 if (newhandler == NULL) { 902 891 return(-1); 903 892 } 904 893 905 894 if (var == NULL) { ................................................................................ 918 907 919 908 return(0); 920 909 } 921 910 922 911 int lc_process_file(const char *appname, const char *pathname, lc_conf_type_t type) { 923 912 int chkretval = 0; 924 913 925 - lc_errno = LC_ERR_NONE; 926 - lc_err_usererrmsg = NULL; 927 - 928 914 switch (type) { 929 915 case LC_CONF_SECTION: 930 916 chkretval = lc_process_conf_section(appname, pathname); 931 917 break; 932 918 case LC_CONF_APACHE: 933 919 chkretval = lc_process_conf_apache(appname, pathname); 934 920 break; ................................................................................ 1018 1004 1019 1005 return(retval); 1020 1006 } 1021 1007 1022 1008 void lc_cleanup(void) { 1023 1009 struct lc_varhandler_st *handler = NULL, *next = NULL; 1024 1010 1025 - lc_errno = LC_ERR_NONE; 1026 - lc_err_usererrmsg = NULL; 1027 - 1028 1011 handler = varhandlers; 1029 1012 while (handler != NULL) { 1030 1013 if (handler->var != NULL) { 1031 1014 free(handler->var); 1032 1015 } 1033 1016 1034 1017 next = handler->_next;