r3558 - trunk/src/target/gsm/src/gsmd

tick at sita.openmoko.org tick at sita.openmoko.org
Tue Dec 4 08:24:24 CET 2007


Author: tick
Date: 2007-12-04 08:24:05 +0100 (Tue, 04 Dec 2007)
New Revision: 3558

Modified:
   trunk/src/target/gsm/src/gsmd/ext_response.c
Log:
gsmd: make extrsp_parse() can take care another input (sean_chiang)


Modified: trunk/src/target/gsm/src/gsmd/ext_response.c
===================================================================
--- trunk/src/target/gsm/src/gsmd/ext_response.c	2007-12-04 07:22:17 UTC (rev 3557)
+++ trunk/src/target/gsm/src/gsmd/ext_response.c	2007-12-04 07:24:05 UTC (rev 3558)
@@ -109,16 +109,16 @@
 			}
 			break;
 		case TOKEN_NUMERIC:
-			if (*cur == ',') {
+			if (isdigit(*cur)) {
+				*cur_buf = *cur;
+				cur_buf++;
+			}
+
+			if (*cur == ',' || *(cur+1) == '\0') {
 				/* end of number */
 				cur_token->u.numeric = atoi(buf);
 				er->num_tokens++;
 				state = IDLE;
-			} else if (isdigit(*cur)) {
-				*cur_buf = *cur;
-				cur_buf++;
-			} else {
-				/* ERORR */
 			}
 			break;
 		case TOKEN_STRING:





More information about the commitlog mailing list