Version 0.1.4 from FTP
authorMark Spencer <markster@digium.com>
Tue, 4 Jul 2000 15:50:00 +0000 (15:50 +0000)
committerMark Spencer <markster@digium.com>
Tue, 4 Jul 2000 15:50:00 +0000 (15:50 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile
apps/app_voicemail.c
channels/Makefile
pbx.c

index 75f2423..123447a 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -25,9 +25,8 @@ DEBUG=-g #-pg
 INCLUDE=-Iinclude -I../include
 CFLAGS=-pipe -Wall -Werror -Wmissing-prototypes -Wmissing-declarations -O6 $(DEBUG) $(INCLUDE) -D_REENTRANT
 CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
-CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
 SUBDIRS=channels pbx apps codecs formats
-LIBS=-ldl -lpthread -lreadline #-lefence
+LIBS=-ldl -lpthread -lreadline # -lefence
 OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o translate.o file.o say.o pbx.o cli.o md5.o asterisk.o
 CC=gcc
 INSTALL=install
index 939587f..0106d61 100755 (executable)
@@ -329,7 +329,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
        }
        do {
                /* Prompt for, and read in the username */
-               if (ast_readstring(chan, username, sizeof(username), 2000, 5000, "#")) {
+               if (ast_readstring(chan, username, sizeof(username), 2000, 10000, "#")) {
                        ast_log(LOG_WARNING, "Couldn't read username\n");
                        goto out;
                }                       
@@ -343,7 +343,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
                        ast_log(LOG_WARNING, "Unable to stream password file\n");
                        goto out;
                }
-               if (ast_readstring(chan, password, sizeof(password), 2000, 5000, "#")) {
+               if (ast_readstring(chan, password, sizeof(password), 2000, 10000, "#")) {
                        ast_log(LOG_WARNING, "Unable to read password\n");
                        goto out;
                }
index 411ce35..c7d29c6 100755 (executable)
@@ -17,6 +17,7 @@ CHANNEL_LIBS=chan_vofr.so chan_modem.so \
 CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
 
 CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
+CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
 
 CFLAGS+=#-DVOFRDUMPER
 
@@ -28,6 +29,13 @@ clean:
 %.so : %.o
        $(CC) -shared -Xlinker -x -o $@ $<
 
+#libiax.a: libiax.o
+#      rm -f libiax.a
+#      $(AR) cr libiax.a libiax.o
+
+#chan_iax.so: chan_iax.o libiax.a
+#      $(CC) -shared -Xlinker -x -o $@ $< -L. -liax
+
 #chan_modem.so : chan_modem.o
 #      $(CC) -rdynamic -shared -Xlinker -x -o $@ $<
 
diff --git a/pbx.c b/pbx.c
index 99d09ea..c84784b 100755 (executable)
--- a/pbx.c
+++ b/pbx.c
@@ -471,8 +471,11 @@ static void *pbx_thread(void *data)
                                digit = ast_waitstream(c, AST_DIGIT_ANY);
                                ast_stopstream(c);
                                /* Hang up if something goes wrong */
-                               if (digit < 0)
+                               if (digit < 0) {
+                                       if (option_verbose > 2)
+                                               ast_verbose(VERBOSE_PREFIX_3 "Lost connection on %s\n", c->name);
                                        goto out;
+                               }
                                else if (digit) {
                                        exten[pos++] = digit;
                                        break;
@@ -487,7 +490,7 @@ static void *pbx_thread(void *data)
                else
                        waittime = c->pbx->rtimeout;
                while(!ast_exists_extension(c, c->context, exten, 1) && 
-                     ast_canmatch_extension(c, c->context, exten, 1)) {
+                      ast_canmatch_extension(c, c->context, exten, 1)) {
                        /* As long as we're willing to wait, and as long as it's not defined, 
                           keep reading digits until we can't possibly get a right answer anymore.  */
                        digit = ast_waitfordigit(c, waittime * 1000);