diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-05 19:07:27 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-05 19:07:27 +0000 |
commit | 13366a3a41485cc4a8aadcd81eb99b674c0f2abf (patch) | |
tree | 587127c83bf7f01e5c281920e0b216eec48c8344 /main | |
parent | 18a9621da9bf0d4e71480a50d0534d5743bb1a4c (diff) |
Merge the adaptive realtime branch, which will make adding new required fields
to realtime less painful in the future.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120789 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-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 550222bc6..f765da170 100644 --- a/main/config.c +++ b/main/config.c @@ -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; |