gracefully fail if d-modem helper cannot be launched
This commit is contained in:
parent
f3c4dfb2eb
commit
b86058be12
1 changed files with 6 additions and 1 deletions
|
@ -635,7 +635,12 @@ static int socket_start (struct modem *m)
|
||||||
char str[16];
|
char str[16];
|
||||||
snprintf(str,sizeof(str),"%d",sockets[0]);
|
snprintf(str,sizeof(str),"%d",sockets[0]);
|
||||||
close(sockets[1]);
|
close(sockets[1]);
|
||||||
execl(modem_exec,modem_exec,m->dial_string,str,NULL);
|
ret = execl(modem_exec,modem_exec,m->dial_string,str,NULL);
|
||||||
|
if (ret == -1) {
|
||||||
|
ERR("prog: %s\n", modem_exec);
|
||||||
|
perror("execl");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
close(sockets[0]);
|
close(sockets[0]);
|
||||||
dev->fd = sockets[1];
|
dev->fd = sockets[1];
|
||||||
|
|
Loading…
Reference in a new issue