Retry to open the modem even if the device node does not exist
This commit is contained in:
parent
94293478f8
commit
772ccd3187
|
@ -285,7 +285,11 @@ static gboolean _on_reset(gpointer data)
|
||||||
|
|
||||||
gsm->source = 0;
|
gsm->source = 0;
|
||||||
if((fd = open(gsm->device, O_RDWR | O_NONBLOCK)) < 0)
|
if((fd = open(gsm->device, O_RDWR | O_NONBLOCK)) < 0)
|
||||||
|
{
|
||||||
|
if(gsm->retry > 0)
|
||||||
|
gsm->source = g_timeout_add(gsm->retry, _on_reset, gsm);
|
||||||
return phone_error(NULL, "open", FALSE);
|
return phone_error(NULL, "open", FALSE);
|
||||||
|
}
|
||||||
if(_reset_do(gsm, fd) != 0)
|
if(_reset_do(gsm, fd) != 0)
|
||||||
{
|
{
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user