Shutdown prpoerly
This commit is contained in:
parent
dd107285cf
commit
b27026d0cb
3 changed files with 4 additions and 1 deletions
|
@ -24,6 +24,7 @@ void yyerror(str)
|
||||||
{
|
{
|
||||||
lprintf(fatal, "parser: error: %s at line %d chr %d (near %s)\n", str,
|
lprintf(fatal, "parser: error: %s at line %d chr %d (near %s)\n", str,
|
||||||
lincnt, chrcnt, yytext);
|
lincnt, chrcnt, yytext);
|
||||||
|
shutd();
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
int yywrap(void)
|
int yywrap(void)
|
||||||
|
|
|
@ -55,6 +55,8 @@ void initialize(void)
|
||||||
pthread_mutex_lock(&cfmx);
|
pthread_mutex_lock(&cfmx);
|
||||||
if(init_modem(cf.modemdev) != 1) {
|
if(init_modem(cf.modemdev) != 1) {
|
||||||
lprintf(warn, "warning: modem didn't initialise properly; see previous messages\n");
|
lprintf(warn, "warning: modem didn't initialise properly; see previous messages\n");
|
||||||
|
shutd();
|
||||||
|
exit(-1);
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&cfmx);
|
pthread_mutex_unlock(&cfmx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ void *modem_io(k)
|
||||||
/* struct timeval tv;
|
/* struct timeval tv;
|
||||||
short dotm = 0; */
|
short dotm = 0; */
|
||||||
char cbuf[2];
|
char cbuf[2];
|
||||||
if(k == 0) ;
|
if(k == 0) k = 0;
|
||||||
*cbuf = '\0'; cbuf[1] = '\0';
|
*cbuf = '\0'; cbuf[1] = '\0';
|
||||||
pthread_mutex_lock(&modemmx);
|
pthread_mutex_lock(&modemmx);
|
||||||
pthread_mutex_lock(&miomx);
|
pthread_mutex_lock(&miomx);
|
||||||
|
|
Loading…
Reference in a new issue