Merge the adaptive realtime branch, which will make adding new required fields

to realtime less painful in the future.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-06-05 19:07:27 +00:00
parent 2347ebf436
commit 9471b87d27
13 changed files with 892 additions and 24 deletions

View File

@@ -2101,6 +2101,38 @@ int ast_realtime_enabled()
return config_maps ? 1 : 0;
}
int ast_realtime_require_field(const char *family, ...)
{
struct ast_config_engine *eng;
char db[256] = "";
char table[256] = "";
va_list ap;
int res = -1;
va_start(ap, family);
eng = find_engine(family, db, sizeof(db), table, sizeof(table));
if (eng && eng->require_func) {
res = eng->require_func(db, table, ap);
}
va_end(ap);
return res;
}
int ast_unload_realtime(const char *family)
{
struct ast_config_engine *eng;
char db[256] = "";
char table[256] = "";
int res = -1;
eng = find_engine(family, db, sizeof(db), table, sizeof(table));
if (eng && eng->unload_func) {
res = eng->unload_func(db, table);
}
return res;
}
struct ast_config *ast_load_realtime_multientry(const char *family, ...)
{
struct ast_config_engine *eng;