Let the GPRS plug-in disconnect from the network again
This commit is contained in:
parent
96f4281311
commit
54b442ce14
14
src/gsm.c
14
src/gsm.c
@ -996,12 +996,6 @@ GSMCommand * gsm_queue(GSM * gsm, char const * command)
|
|||||||
|
|
||||||
if(command == NULL || command[0] == '\0')
|
if(command == NULL || command[0] == '\0')
|
||||||
return NULL;
|
return NULL;
|
||||||
if(gsm->mode == GSM_MODE_DATA && strcmp(command, "ATH") == 0) /* XXX */
|
|
||||||
{
|
|
||||||
gsm_event(gsm, GSM_EVENT_TYPE_GPRS_ATTACHMENT, 0);
|
|
||||||
gsm_reset(gsm, 0, NULL);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
if((gsmc = gsm_command_new(command)) == NULL)
|
if((gsmc = gsm_command_new(command)) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
if(gsm_queue_command(gsm, gsmc) == 0)
|
if(gsm_queue_command(gsm, gsmc) == 0)
|
||||||
@ -1017,9 +1011,17 @@ int gsm_queue_command(GSM * gsm, GSMCommand * gsmc)
|
|||||||
GSMPriority priority;
|
GSMPriority priority;
|
||||||
GSList * l;
|
GSList * l;
|
||||||
GSMCommand * p;
|
GSMCommand * p;
|
||||||
|
char const * q;
|
||||||
|
|
||||||
if(gsmc == NULL)
|
if(gsmc == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
|
if(gsm->mode == GSM_MODE_DATA && (p = gsm_command_get_command(gsmc))
|
||||||
|
&& strcmp(p, "ATH") == 0) /* XXX */
|
||||||
|
{
|
||||||
|
gsm_event(gsm, GSM_EVENT_TYPE_GPRS_ATTACHMENT, 0);
|
||||||
|
gsm_reset(gsm, 0, NULL);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
/* the GSM_PRIORITY_HIGHEST priority is meant to avoid races */
|
/* the GSM_PRIORITY_HIGHEST priority is meant to avoid races */
|
||||||
if((priority = gsm_command_get_priority(gsmc)) > GSM_PRIORITY_HIGH)
|
if((priority = gsm_command_get_priority(gsmc)) > GSM_PRIORITY_HIGH)
|
||||||
priority = GSM_PRIORITY_HIGH;
|
priority = GSM_PRIORITY_HIGH;
|
||||||
|
Loading…
Reference in New Issue
Block a user