X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=main.c;h=2f119380b0a6d48d13559196ca65a7ab247c8f07;hp=599a91120662e5a93a87cda3a7bc62817cd994dc;hb=54d34cda7a6f0d9bd3ff22d529ce69ff2c004bd3;hpb=5a22e57828617abc14e27814ee918cc63b96fd46 diff --git a/main.c b/main.c index 599a911..2f11938 100644 --- a/main.c +++ b/main.c @@ -199,7 +199,6 @@ int main(int argc, char *argv[]) double start_d; #endif int idletime = 0, idlecheck = 0; - char debug_log[128]; char tracetext[256]; /* current time */ @@ -287,22 +286,11 @@ int main(int argc, char *argv[]) if (read_options() == 0) goto free; - /* initialize stuff of the NT lib */ - if (options.deb & DEBUG_STACK) - { - global_debug = 0xffffffff & ~DBGM_MSG; -// global_debug = DBGM_L3DATA; - } else - global_debug = DBGM_MAN; - SPRINT(debug_log, "%s/debug.log", INSTALL_DATA); - if (options.deb & DEBUG_LOG) - debug_init(global_debug, debug_log, debug_log, debug_log); - else - debug_init(global_debug, NULL, NULL, NULL); + /* init mISDN */ + if (mISDN_initialize() < 0) + goto free; created_debug = 1; - msg_init(); - /* read ruleset(s) */ if (!(ruleset_first = ruleset_parse())) goto free; @@ -782,9 +770,8 @@ free: if (pthread_mutex_destroy(&mutexd)) fprintf(stderr, "cannot destroy 'PDEBUG' mutex\n"); - /* close debug */ - if (created_debug) - debug_close(); + /* deinitialize mISDN */ + mISDN_deinitialize(); global_debug = 0; /* display memory leak */