int fduse = 0;
int fhuse = 0;
-char *debug_prefix = 0;
+const char *debug_prefix = NULL;
int debug_count = 0;
int last_debug = 0;
int debug_newline = 1;
int nooutput = 0;
-void debug_usleep(int msec, char *file, int line, int hour, int min, int sec)
+void debug_usleep(int msec, const char *file, int line, int hour, int min, int sec)
{
usleep(msec);
}
-void debug(const char *function, int line, char *prefix, char *buffer)
+void debug(const char *function, int line, const char *prefix, char *buffer)
{
/* if we have a new debug count, we add a mark */
if (last_debug != debug_count)
int all_idle;
char prefix_string[64];
struct sched_param schedp;
- char *debug_prefix = "alloc";
+ const char *debug_prefix = "alloc";
int created_mutexd = 0,/* created_mutext = 0,*/ created_mutexe = 0,
created_lock = 0, created_signal = 0, created_debug = 0,
created_misdn = 0;
/* query available isdn ports */
if (!(strcasecmp(argv[1],"query")))
{
- fprintf(stderr, "-> Using 'isdninfo'\n");
- system("isdninfo");
+ fprintf(stderr, "-> Using 'misdn_info'\n");
+ system("misdn_info");
ret = 0;
goto free;
}
/* create lock and lock! */
SPRINT(lock, "%s/lcr.lock", options.lock);
- if ((lockfd = open(lock, O_CREAT | O_WRONLY)) < 0)
+ if ((lockfd = open(lock, O_CREAT | O_WRONLY, S_IWUSR)) < 0)
{
fprintf(stderr, "Cannot create lock file: %s\n", lock);
fprintf(stderr, "Check options.conf to change to path with permissions for you.\n");
/*** main loop ***/
SPRINT(tracetext, "%s %s started, waiting for calls...", NAME, VERSION_STRING);
- start_trace(0, NULL, NULL, NULL, 0, 0, 0, tracetext);
+ start_trace(-1, NULL, NULL, NULL, 0, 0, 0, tracetext);
printf("%s\n", tracetext);
end_trace();
GET_NOW();
}
SPRINT(tracetext, "%s terminated", NAME);
printf("%s\n", tracetext);
- start_trace(0, NULL, NULL, NULL, 0, 0, 0, tracetext);
+ start_trace(-1, NULL, NULL, NULL, 0, 0, 0, tracetext);
if (quit)
- add_trace("signal", NULL, "%d", quit);
+ add_trace((char *)"signal", NULL, "%d", quit);
end_trace();
ret=0;
if (b) \
{ \
SPRINT(tracetext, a, NAME); \
- start_trace(0, NULL, NULL, NULL, 0, 0, 0, tracetext); \
+ start_trace(-1, NULL, NULL, NULL, 0, 0, 0, tracetext); \
if (ret) add_trace("blocks", NULL, "%d", b); \
end_trace(); \
printf("\n******************************\n\007"); \
/* special debug function to detect buffer overflow
*/
int budetect_stop = 0;
-void budetect(const char *file, int line, char *function)
+void budetect(const char *file, int line, const char *function)
{
if (budetect_stop)
return;