mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
via 8118, a RealTime upgrade to make RT a complete storage abstraction. The store/destroy mechanisms needed these missing peices.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1426,6 +1426,38 @@ int ast_update_realtime(const char *family, const char *keyfield, const char *lo
|
||||
return res;
|
||||
}
|
||||
|
||||
int ast_store_realtime(const char *family, ...) {
|
||||
struct ast_config_engine *eng;
|
||||
int res = -1;
|
||||
char db[256]="";
|
||||
char table[256]="";
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, family);
|
||||
eng = find_engine(family, db, sizeof(db), table, sizeof(table));
|
||||
if (eng && eng->store_func)
|
||||
res = eng->store_func(db, table, ap);
|
||||
va_end(ap);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
int ast_destroy_realtime(const char *family, const char *keyfield, const char *lookup, ...) {
|
||||
struct ast_config_engine *eng;
|
||||
int res = -1;
|
||||
char db[256]="";
|
||||
char table[256]="";
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, lookup);
|
||||
eng = find_engine(family, db, sizeof(db), table, sizeof(table));
|
||||
if (eng && eng->destroy_func)
|
||||
res = eng->destroy_func(db, table, keyfield, lookup, ap);
|
||||
va_end(ap);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int config_command(int fd, int argc, char **argv)
|
||||
{
|
||||
struct ast_config_engine *eng;
|
||||
|
Reference in New Issue
Block a user