Shutdown prpoerly

This commit is contained in:
dcp1990 2005-06-18 23:23:44 +00:00
parent dd107285cf
commit b27026d0cb
3 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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);