mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Bug 8803 - Fix crash in API
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1317,18 +1317,27 @@ struct ast_config *ast_config_load_with_comments(const char *filename)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ast_variable *ast_load_realtime_all(const char *family, ...)
|
static struct ast_variable *ast_load_realtime_helper(const char *family, va_list ap)
|
||||||
{
|
{
|
||||||
struct ast_config_engine *eng;
|
struct ast_config_engine *eng;
|
||||||
char db[256]="";
|
char db[256]="";
|
||||||
char table[256]="";
|
char table[256]="";
|
||||||
struct ast_variable *res=NULL;
|
struct ast_variable *res=NULL;
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
va_start(ap, family);
|
|
||||||
eng = find_engine(family, db, sizeof(db), table, sizeof(table));
|
eng = find_engine(family, db, sizeof(db), table, sizeof(table));
|
||||||
if (eng && eng->realtime_func)
|
if (eng && eng->realtime_func)
|
||||||
res = eng->realtime_func(db, table, ap);
|
res = eng->realtime_func(db, table, ap);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct ast_variable *ast_load_realtime_all(const char *family, ...)
|
||||||
|
{
|
||||||
|
struct ast_variable *res;
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
|
va_start(ap, family);
|
||||||
|
res = ast_load_realtime_helper(family, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
@@ -1340,7 +1349,7 @@ struct ast_variable *ast_load_realtime(const char *family, ...)
|
|||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, family);
|
va_start(ap, family);
|
||||||
res = ast_load_realtime_all(family, ap);
|
res = ast_load_realtime_helper(family, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
/* Eliminate blank entries */
|
/* Eliminate blank entries */
|
||||||
|
|||||||
Reference in New Issue
Block a user