diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-11 13:41:17 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-11 13:41:17 +0000 |
commit | 843df7bef93f3786e10d80c01971660aa7eda39a (patch) | |
tree | 65c20d4078ecda378ae06b50bcca59b72be8c5c8 /main/config.c | |
parent | c58ebc051cc4a990a4a09da11fad0d8035cbb3a4 (diff) |
via 8118, a RealTime upgrade to make RT a complete storage abstraction. The store/destroy mechanisms needed these missing peices.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@61374 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/config.c')
-rw-r--r-- | main/config.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/main/config.c b/main/config.c index a3cf96c50..9bc97eac6 100644 --- a/main/config.c +++ b/main/config.c @@ -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; |