From 94bfe1d72a36b701430f5f73a71431f1c4881ef1 Mon Sep 17 00:00:00 2001 From: laforge Date: Fri, 17 Aug 2007 08:34:29 +0000 Subject: Use vendor specific ext_chars. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2728 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/gsmd/atcmd.c | 4 ++-- src/gsmd/vendor_qc.c | 1 + src/gsmd/vendor_ti.c | 1 + src/gsmd/vendor_tihtc.c | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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, -- cgit v1.2.3