diff --git a/phoned/config.y b/phoned/config.y index ef39d55..699c847 100644 --- a/phoned/config.y +++ b/phoned/config.y @@ -24,6 +24,7 @@ void yyerror(str) { lprintf(fatal, "parser: error: %s at line %d chr %d (near %s)\n", str, lincnt, chrcnt, yytext); + shutd(); exit(-1); } int yywrap(void) diff --git a/phoned/init.c b/phoned/init.c index 6474bb0..84baacf 100644 --- a/phoned/init.c +++ b/phoned/init.c @@ -55,6 +55,8 @@ void initialize(void) pthread_mutex_lock(&cfmx); if(init_modem(cf.modemdev) != 1) { lprintf(warn, "warning: modem didn't initialise properly; see previous messages\n"); + shutd(); + exit(-1); } pthread_mutex_unlock(&cfmx); } diff --git a/phoned/modem.c b/phoned/modem.c index f2564b0..0a1171a 100644 --- a/phoned/modem.c +++ b/phoned/modem.c @@ -187,7 +187,7 @@ void *modem_io(k) /* struct timeval tv; short dotm = 0; */ char cbuf[2]; - if(k == 0) ; + if(k == 0) k = 0; *cbuf = '\0'; cbuf[1] = '\0'; pthread_mutex_lock(&modemmx); pthread_mutex_lock(&miomx);