support configurable batch posting of CDRs (off by default) (bug #3883)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-06-03 01:42:31 +00:00
parent 0582912c5d
commit 23472dd2c0
8 changed files with 530 additions and 17 deletions

View File

@@ -45,6 +45,7 @@
#include "asterisk/tdd.h"
#include "asterisk/term.h"
#include "asterisk/manager.h"
#include "asterisk/cdr.h"
#include "asterisk/pbx.h"
#include "asterisk/enum.h"
#include "asterisk/rtp.h"
@@ -601,6 +602,8 @@ static void quit_handler(int num, int nice, int safeshutdown, int restart)
char filename[80] = "";
time_t s,e;
int x;
/* Try to get as many CDRs as possible submitted to the backend engines (if in batch mode) */
ast_cdr_engine_term();
if (safeshutdown) {
shuttingdown = 1;
if (!nice) {
@@ -1952,6 +1955,10 @@ int main(int argc, char *argv[])
printf(term_quit());
exit(1);
}
if (ast_cdr_engine_init()) {
printf(term_quit());
exit(1);
}
ast_rtp_init();
if (ast_image_init()) {
printf(term_quit());