[Asterisk-cvs] asterisk config_old.c,NONE,1.1

markster at lists.digium.com markster at lists.digium.com
Tue Jan 25 00:08:53 CST 2005


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv27304

Added Files:
	config_old.c 
Log Message:
Add old config files (bug #3406)


--- NEW FILE: config_old.c ---
/*
 * Asterisk -- A telephony toolkit for Linux.
 *
 * Configuration File Parser (Deprecated APIs)
 * 
 * Copyright (C) 2005, Digium, Inc.
 *
 * Mark Spencer <markster at 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);
}





More information about the svn-commits mailing list