aboutsummaryrefslogtreecommitdiff
path: root/src/modem.c
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-07-01 12:20:59 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-07-01 12:20:59 +0200
commitfda029b80d389a15328c789e17047da7e4089fdb (patch)
tree55d1313d1c9ea53534de4836af387352a6a1c610 /src/modem.c
parente6629281ffd30e5660b7e29003c0f9b40c586bdc (diff)
downloadbbs-fda029b80d389a15328c789e17047da7e4089fdb.tar.gz
wait for RING is now optional with define
Diffstat (limited to 'src/modem.c')
-rw-r--r--src/modem.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modem.c b/src/modem.c
index f499c13..a5644a7 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -24,17 +24,19 @@ int modem_accept_wait(int fd)
modem_command(fd, _AT_MUTE, 1000);
modem_command(fd, _AT_RESET_ON_DTR, 1000);
-/* //DONT wait for ring
+#ifdef _MODEM_WAIT_RING //DONT wait for ring
while ( 1 ) { //wait for RING
ret = poll(&fds, 1, 2000); //poll in 2s interval
usleep(5000);
if(ret) {
cnt = read ( fd, buff, 128 );
if(strstr(buff, "RING"))
- break;
+ break;
}
}
-*/
+#else
+#warning "Wait for RING disabled"
+#endif
printf("Modem RINGING\n");
int ok = 5;
int timeout = 60000;