diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-01-25 06:11:11 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-01-25 06:11:11 +0000 |
commit | 7af32f3a63989284fd9b681f86bde282f5e524a2 (patch) | |
tree | c7e53eefbba4da4312fc8b72c9fbff4e6096dd42 /config_old.c | |
parent | 2207b9a515214bf72785eabf75bd587bd7df23e8 (diff) |
Add old config files (bug #3406)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4890 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'config_old.c')
-rwxr-xr-x | config_old.c | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/config_old.c b/config_old.c new file mode 100755 index 000000000..9b922025c --- /dev/null +++ b/config_old.c @@ -0,0 +1,67 @@ +/* + * Asterisk -- A telephony toolkit for Linux. + * + * Configuration File Parser (Deprecated APIs) + * + * Copyright (C) 2005, Digium, Inc. + * + * Mark Spencer <markster@digium.com> + * + * This program is free software, distributed under the terms of + * the GNU General Public License + */ + +#include <stdio.h> +#include <unistd.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <asterisk/config.h> +#include <asterisk/logger.h> + +struct ast_config *ast_load(char *configfile) +{ + static int warning = 0; + + if (!warning) { + ast_log(LOG_WARNING, "ast_load is deprecated, use ast_config_load instead!\n"); + warning = 1; + } + + return ast_config_load(configfile); +} + +void ast_destroy(struct ast_config *config) +{ + static int warning = 0; + + if (!warning) { + ast_log(LOG_WARNING, "ast_destroy is deprecated, use ast_config_destroy instead!\n"); + warning = 1; + } + ast_config_destroy(config); +} + +void ast_destroy_realtime(struct ast_variable *var) +{ + static int warning = 0; + + if (!warning) { + ast_log(LOG_WARNING, "ast_destroy_realtime is deprecated, use ast_variables_destroy instead!\n"); + warning = 1; + } + ast_variables_destroy(var); +} + +struct ast_config *ast_internal_load(const char *configfile, struct ast_config *cfg) +{ + static int warning = 0; + + if (!warning) { + ast_log(LOG_WARNING, "ast_internal_load is deprecated, use ast_config_internal_load instead!\n"); + warning = 1; + } + + return ast_internal_load(configfile, cfg); +} + |