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

@@ -1743,6 +1743,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
if (rt_log_members) {
/* Update table */
snprintf(members, sizeof(members), "%d", conf->users);
ast_realtime_require_field("meetme", "confno", RQ_INTEGER, strlen(conf->confno), "members", RQ_INTEGER, strlen(members), NULL);
ast_update_realtime("meetme", "confno", conf->confno, "members", members, NULL);
}
setusercount = 1;
@@ -2682,6 +2683,7 @@ bailoutandtrynormal:
if (rt_log_members) {
/* Update table */
snprintf(members, sizeof(members), "%d", conf->users);
ast_realtime_require_field("meetme", "confno", RQ_INTEGER, strlen(conf->confno), "members", RQ_INTEGER, strlen(members), NULL);
ast_update_realtime("meetme", "confno", conf->confno, "members", members, NULL);
}
if (confflags & CONFFLAG_MARKEDUSER)
@@ -5677,6 +5679,7 @@ static int unload_module(void)
sla_destroy();
res |= ast_custom_function_unregister(&meetme_info_acf);
ast_unload_realtime("meetme");
return res;
}
@@ -5707,12 +5710,14 @@ static int load_module(void)
res |= ast_devstate_prov_add("SLA", sla_state);
res |= ast_custom_function_register(&meetme_info_acf);
ast_realtime_require_field("meetme", "confno", RQ_INTEGER, 3, "members", RQ_INTEGER, 3, NULL);
return res;
}
static int reload(void)
{
ast_unload_realtime("meetme");
return load_config(1);
}