Default to using quotes for SIM PIN authentication

This commit is contained in:
Pierre Pronchery 2014-09-08 06:04:01 +02:00
parent f61f2c2d81
commit 954f89cbc9
3 changed files with 9 additions and 9 deletions

View File

@ -1782,8 +1782,8 @@ static char * _request_attention_sim_pin(Hayes * hayes, HayesChannel * channel,
hayes->helper->error(NULL, strerror(errno), 1);
return NULL;
}
format = (channel->quirks & HAYES_QUIRK_CPIN_QUOTES) ? "%s\"%s\""
: "%s%s";
format = (channel->quirks & HAYES_QUIRK_CPIN_NO_QUOTES) ? "%s%s"
: "%s\"%s\"";
snprintf(ret, len, format, cmd, password);
return ret;
}
@ -1804,8 +1804,8 @@ static char * _request_attention_sim_puk(Hayes * hayes, HayesChannel * channel,
hayes->helper->error(NULL, strerror(errno), 1);
return NULL;
}
format = (channel->quirks & HAYES_QUIRK_CPIN_QUOTES) ? "%s\"%s\","
: "%s%s,";
format = (channel->quirks & HAYES_QUIRK_CPIN_NO_QUOTES) ? "%s%s,"
: "%s\"%s\",";
snprintf(ret, len, format, cmd, password);
return ret;
}

View File

@ -25,18 +25,18 @@
HayesQuirks hayes_quirks[] =
{
{ "\"Neo1973 Embedded GSM Modem\"",
HAYES_QUIRK_CPIN_QUOTES | HAYES_QUIRK_WANT_SMSC_IN_PDU
HAYES_QUIRK_WANT_SMSC_IN_PDU
| HAYES_QUIRK_CONNECTED_LINE_DISABLED
| HAYES_QUIRK_REPEAT_ON_UNKNOWN_ERROR },
{ "\"Neo1973 GTA01/GTA02 Embedded GSM Modem\"",
HAYES_QUIRK_CPIN_QUOTES | HAYES_QUIRK_WANT_SMSC_IN_PDU
HAYES_QUIRK_WANT_SMSC_IN_PDU
| HAYES_QUIRK_CONNECTED_LINE_DISABLED
| HAYES_QUIRK_REPEAT_ON_UNKNOWN_ERROR },
{ "\"Neo1973 GTA02 Embedded GSM Modem\"",
HAYES_QUIRK_CPIN_QUOTES | HAYES_QUIRK_WANT_SMSC_IN_PDU
HAYES_QUIRK_WANT_SMSC_IN_PDU
| HAYES_QUIRK_CONNECTED_LINE_DISABLED
| HAYES_QUIRK_REPEAT_ON_UNKNOWN_ERROR },
{ "Nokia N900",
HAYES_QUIRK_CPIN_QUOTES | HAYES_QUIRK_BATTERY_70 },
HAYES_QUIRK_BATTERY_70 },
{ NULL, 0 }
};

View File

@ -25,7 +25,7 @@
typedef enum _HayesQuirk
{
HAYES_QUIRK_BATTERY_70 = 0x1,
HAYES_QUIRK_CPIN_QUOTES = 0x2,
HAYES_QUIRK_CPIN_NO_QUOTES = 0x2,
HAYES_QUIRK_CONNECTED_LINE_DISABLED = 0x4,
HAYES_QUIRK_WANT_SMSC_IN_PDU = 0x8,
HAYES_QUIRK_REPEAT_ON_UNKNOWN_ERROR = 0x10