aboutsummaryrefslogtreecommitdiffstats
path: root/plugin_huawei.c
diff options
context:
space:
mode:
authormichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2010-02-23 03:27:16 +0000
committermichael <michael@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2010-02-23 03:27:16 +0000
commitadaa4da6bb46042c127714a20fde31ff12fa96a2 (patch)
tree59a97a01a49e0c5036e231e2c4ecab534506a629 /plugin_huawei.c
parent0bffa599cc6501471fcf97ea331f6ebd458fdadc (diff)
downloadlcd4linux-adaa4da6bb46042c127714a20fde31ff12fa96a2.tar.gz
'Fix the huawei e220 at commands' by Jar
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1115 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'plugin_huawei.c')
-rw-r--r--plugin_huawei.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/plugin_huawei.c b/plugin_huawei.c
index 69215fa..b94559a 100644
--- a/plugin_huawei.c
+++ b/plugin_huawei.c
@@ -94,16 +94,16 @@
#define MIN_INTERVAL 100 /* minimum query interval 100 ms */
-#define INIT_STRING "ATE1;^CURC=0;^DSFLOWCLR" /* disable unsolicited report codes and reset DS traffic
+#define INIT_STRING "ATE1 ^CURC=0;^DSFLOWCLR" /* disable unsolicited report codes and reset DS traffic
* with local echo enabled
*/
-#define QUALITY "ATE1;+CSQ" /* signal quality query with local echo enabled */
-#define SYSINFO "ATE1;^SYSINFO" /* network access query with local echo enabled */
-#define MANUF "ATE1;+GMI" /* manufacturer query with local echo enabled */
-#define MODEL "ATE1;+GMM" /* model query with local echo enabled */
-#define FWVER "ATE1;+CGMR" /* firmware version query with local echo enabled */
-#define FLOWREPORT "ATE1;^DSFLOWQRY" /* DS traffic query with local echo enabled */
-#define OPERATOR "ATE1;+COPS=3,0;+COPS?" /* gsm/umts operator query (3=set format only, 0=long alphanum. string)
+#define QUALITY "ATE1 +CSQ" /* signal quality query with local echo enabled */
+#define SYSINFO "ATE1 ^SYSINFO" /* network access query with local echo enabled */
+#define MANUF "ATE1 +GMI" /* manufacturer query with local echo enabled */
+#define MODEL "ATE1 +GMM" /* model query with local echo enabled */
+#define FWVER "ATE1 +CGMR" /* firmware version query with local echo enabled */
+#define FLOWREPORT "ATE1 ^DSFLOWQRY" /* DS traffic query with local echo enabled */
+#define OPERATOR "ATE1 +COPS=3,0;+COPS?" /* gsm/umts operator query (3=set format only, 0=long alphanum. string)
* with local echo enabled
*/
@@ -738,7 +738,7 @@ static void huawei_read_fwver(const char *cmd)
static void huawei_read_operator(const char *cmd)
{
- int bytes, i, pos, copy;
+ int bytes, i, pos = 0, copy = 0;
char *buf;
buf = huawei_send_receive(cmd);
@@ -753,9 +753,6 @@ static void huawei_read_operator(const char *cmd)
*/
/* parse "operator string" */
- pos = 0;
- copy = 0;
-
for (i = 6; i <= bytes; i++) {
if (buf[i] == '\"' && copy == 0) {
i++;