diff options
Diffstat (limited to 'src/gsmd')
-rw-r--r-- | src/gsmd/atcmd.c | 4 | ||||
-rw-r--r-- | src/gsmd/vendor_qc.c | 1 | ||||
-rw-r--r-- | src/gsmd/vendor_ti.c | 1 | ||||
-rw-r--r-- | src/gsmd/vendor_tihtc.c | 1 |
4 files changed, 5 insertions, 2 deletions
diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c index 9d45588..800035a 100644 --- a/src/gsmd/atcmd.c +++ b/src/gsmd/atcmd.c @@ -237,7 +237,7 @@ static int ml_parse(const char *buf, int len, void *ctx) * TBD */ - if (buf[0] == '+' || buf[0] == '%') { + if (buf[0] == '+' || strchr(g->vendorpl->ext_chars, buf[0])) { /* an extended response */ const char *colon = strchr(buf, ':'); if (!colon) { @@ -293,7 +293,7 @@ static int ml_parse(const char *buf, int len, void *ctx) } if (cmd) { - if (cmd->buf[2] != '+' && cmd->buf[2] != '%') { + if (cmd->buf[2] != '+' && strchr(g->vendorpl->ext_chars, cmd->buf[2]) == NULL) { gsmd_log(GSMD_ERROR, "extd reply to non-extd command?\n"); return -EINVAL; } diff --git a/src/gsmd/vendor_qc.c b/src/gsmd/vendor_qc.c index a4a65ce..1aa4e6f 100644 --- a/src/gsmd/vendor_qc.c +++ b/src/gsmd/vendor_qc.c @@ -100,6 +100,7 @@ static int qc_initsettings(struct gsmd *g) struct gsmd_vendor_plugin gsmd_vendor_plugin = { .name = "Qualcomm msm6250", + .ext_chars = "@", .num_unsolicit = ARRAY_SIZE(qc_unsolicit), .unsolicit = qc_unsolicit, .detect = &qc_detect, diff --git a/src/gsmd/vendor_ti.c b/src/gsmd/vendor_ti.c index c219355..4c7d182 100644 --- a/src/gsmd/vendor_ti.c +++ b/src/gsmd/vendor_ti.c @@ -303,6 +303,7 @@ static int ticalypso_initsettings(struct gsmd *g) struct gsmd_vendor_plugin gsmd_vendor_plugin = { .name = "TI Calypso", + .ext_chars = "%@", .num_unsolicit = ARRAY_SIZE(ticalypso_unsolicit), .unsolicit = ticalypso_unsolicit, .detect = &ticalypso_detect, diff --git a/src/gsmd/vendor_tihtc.c b/src/gsmd/vendor_tihtc.c index 8add5f7..42f9d50 100644 --- a/src/gsmd/vendor_tihtc.c +++ b/src/gsmd/vendor_tihtc.c @@ -298,6 +298,7 @@ static int tihtc_initsettings(struct gsmd *g) struct gsmd_vendor_plugin gsmd_vendor_plugin = { .name = "TI Calypso / HTC firmware", + .ext_chars = "%", .num_unsolicit = ARRAY_SIZE(tihtc_unsolicit), .unsolicit = tihtc_unsolicit, .detect = &tihtc_detect, |