diff --git a/slmodemd/modem_cmdline.c b/slmodemd/modem_cmdline.c index 9f80619..ec20a91 100644 --- a/slmodemd/modem_cmdline.c +++ b/slmodemd/modem_cmdline.c @@ -125,7 +125,7 @@ static struct opt { {'s',"shortbuffer","use short buffer (4 periods length)"}, {'d',"debug","debug level (developers only, for ./sl...)",OPTIONAL,INTEGER,"0"}, {'l',"log","logging mode",OPTIONAL,INTEGER,"5"}, - {'e',"exec","path to external application that transmits audio over the socket (required)"}, + {'e',"exec","path to external application that transmits audio over the socket (required)",MANDATORY,STRING,""}, {} }; diff --git a/slmodemd/modem_main.c b/slmodemd/modem_main.c index 998090a..2a95097 100644 --- a/slmodemd/modem_main.c +++ b/slmodemd/modem_main.c @@ -635,7 +635,12 @@ static int socket_start (struct modem *m) char str[16]; snprintf(str,sizeof(str),"%d",sockets[0]); 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 { close(sockets[0]); dev->fd = sockets[1];