Added additional debug logging to lcr_read.
[lcr.git] / lcradmin.c
index 222700b..882105b 100644 (file)
@@ -25,6 +25,7 @@
 #include "macro.h"
 #include "options.h"
 #include "join.h"
+#include "select.h"
 #include "joinpbx.h"
 #include "extension.h"
 #include "message.h"
@@ -1578,7 +1579,11 @@ next:
                goto next;
 
                case ADMIN_CALL_NOTIFY:
-               printf("NOTIFY\n notify=%d\n number=%s\n", msg.u.call.notify, msg.u.call.callerid); fflush(stdout);
+               printf("NOTIFY\n notify=%d\n number=%s\n", msg.u.call.notify_progress, msg.u.call.callerid); fflush(stdout);
+               goto next;
+
+               case ADMIN_CALL_PROGRESS:
+               printf("PROGRESS\n progress=%d\n location=%d\n", msg.u.call.notify_progress, msg.u.call.location); fflush(stdout);
                goto next;
 
                case ADMIN_CALL_DISCONNECT:
@@ -1679,7 +1684,7 @@ int main(int argc, char *argv[])
        int sock, conn;
        struct sockaddr_un sock_address;
        const char *ret = "invalid mode";
-
+       char options_error[256];
 
        /* show options */
        if (argc <= 1) {
@@ -1755,7 +1760,7 @@ int main(int argc, char *argv[])
                goto usage;
        }
 
-       if (read_options() == 0) {
+       if (read_options(options_error) == 0) {
                exit(EXIT_FAILURE);
        }