1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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);
}
|