Retry to open the modem even if the device node does not exist

This commit is contained in:
Pierre Pronchery 2010-04-24 17:57:30 +00:00
parent 94293478f8
commit 772ccd3187

View File

@ -285,7 +285,11 @@ static gboolean _on_reset(gpointer data)
gsm->source = 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);
}
if(_reset_do(gsm, fd) != 0)
{
close(fd);