chan_lcr: fixed typo, that made rebuffer-mode request a parameter,
[lcr.git] / main.c
diff --git a/main.c b/main.c
index 21b3384..cf6be07 100644 (file)
--- a/main.c
+++ b/main.c
@@ -100,7 +100,7 @@ void debug(const char *function, int line, char *prefix, char *buffer)
 }
 
 
-void _printdebug(const char *function, int line, unsigned long mask, const char *fmt, ...)
+void _printdebug(const char *function, int line, unsigned int mask, const char *fmt, ...)
 {
        char buffer[4096];
        va_list args;
@@ -226,13 +226,6 @@ int main(int argc, char *argv[])
        /* init crc */
        crc_init();
 
-       /* check for root (real or effective) */
-       if (getuid() && geteuid())
-       {
-               fprintf(stderr, "Please run %s as super-user.\n", NAME);
-               goto free;
-       }
-
        /* the mutex init */
        if (pthread_mutex_init(&mutexd, NULL))
        {
@@ -275,14 +268,18 @@ int main(int argc, char *argv[])
        /* query available isdn ports */
        if (!(strcasecmp(argv[1],"query")))
        {
-               mISDN_port_info();
+               fprintf(stderr, "-> Using 'isdninfo'\n");
+               system("isdninfo");
                ret = 0;
                goto free;
        }
 
        /* read options */
        if (read_options() == 0)
+       {
+               PERROR("%s", options_error);
                goto free;
+       }
 
        /* init mISDN */
        if (mISDN_initialize() < 0)