summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorSuper User2007-07-31 07:34:18 +0200
committerSuper User2007-07-31 07:34:18 +0200
commit54d34cda7a6f0d9bd3ff22d529ce69ff2c004bd3 (patch)
treef58def401dbcb8dc1459770b77d766a7b5d76544 /main.c
parentfixed routing: only parameters that are allowed may be present in the routing... (diff)
downloadlcr-54d34cda7a6f0d9bd3ff22d529ce69ff2c004bd3.tar.gz
lcr-54d34cda7a6f0d9bd3ff22d529ce69ff2c004bd3.tar.xz
lcr-54d34cda7a6f0d9bd3ff22d529ce69ff2c004bd3.zip
fixed crash when receiving notify messages
some other fixes start adding new mISDN api.
Diffstat (limited to 'main.c')
-rw-r--r--main.c23
1 files changed, 5 insertions, 18 deletions
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 */