Force a registration request if unknown when triggered
This commit is contained in:
parent
6b592b294a
commit
7a3458f377
@ -14,7 +14,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
/* FIXME:
|
/* FIXME:
|
||||||
* - implement new contacts
|
* - implement new contacts
|
||||||
* - don't report SIM ready is not explicitly required? or in src/phone.c?
|
|
||||||
* - verify that the error when the SIM PIN code is wrong is handled properly
|
* - verify that the error when the SIM PIN code is wrong is handled properly
|
||||||
* - allow a trace log to be stored */
|
* - allow a trace log to be stored */
|
||||||
|
|
||||||
@ -1179,6 +1178,13 @@ static int _hayes_trigger(ModemPlugin * modem, ModemEventType event)
|
|||||||
break;
|
break;
|
||||||
case MODEM_EVENT_TYPE_REGISTRATION:
|
case MODEM_EVENT_TYPE_REGISTRATION:
|
||||||
e = &hayes->events[MODEM_EVENT_TYPE_REGISTRATION];
|
e = &hayes->events[MODEM_EVENT_TYPE_REGISTRATION];
|
||||||
|
if(e->registration.status
|
||||||
|
== MODEM_REGISTRATION_STATUS_UNKNOWN)
|
||||||
|
{
|
||||||
|
request.type = HAYES_REQUEST_REGISTRATION;
|
||||||
|
ret |= _hayes_request(modem, &request);
|
||||||
|
}
|
||||||
|
else
|
||||||
modem->helper->event(modem->helper->modem, e);
|
modem->helper->event(modem->helper->modem, e);
|
||||||
break;
|
break;
|
||||||
case MODEM_EVENT_TYPE_STATUS:
|
case MODEM_EVENT_TYPE_STATUS:
|
||||||
@ -1980,6 +1986,7 @@ static gboolean _on_reset(gpointer data)
|
|||||||
modem);
|
modem);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
event->status.status = MODEM_STATUS_UNKNOWN;
|
||||||
hayes->channel = g_io_channel_unix_new(fd);
|
hayes->channel = g_io_channel_unix_new(fd);
|
||||||
if((g_io_channel_set_encoding(hayes->channel, NULL, &error))
|
if((g_io_channel_set_encoding(hayes->channel, NULL, &error))
|
||||||
!= G_IO_STATUS_NORMAL)
|
!= G_IO_STATUS_NORMAL)
|
||||||
|
Loading…
Reference in New Issue
Block a user