All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] Remove old server_parse_line
@ 2010-03-03 14:56 Zhenhua Zhang
  2010-03-03 14:56 ` [PATCH 2/7] Add framework of server parser Zhenhua Zhang
  0 siblings, 1 reply; 11+ messages in thread
From: Zhenhua Zhang @ 2010-03-03 14:56 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]

---
 gatchat/gatserver.c |   45 ---------------------------------------------
 1 files changed, 0 insertions(+), 45 deletions(-)

diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
index c9256e2..4175112 100644
--- a/gatchat/gatserver.c
+++ b/gatchat/gatserver.c
@@ -173,55 +173,10 @@ static void g_at_server_send_result(GAtServer *server, GAtServerResult result)
 	send_common(server, buf, MIN(len, sizeof(buf)-1));
 }
 
-static inline gboolean is_at_command_prefix(const char c)
-{
-	switch (c) {
-	case '+':
-	case '*':
-	case '!':
-	case '%':
-		return TRUE;
-	default:
-		return FALSE;
-	}
-}
-
-static GAtServerResult parse_at_command(GAtServer *server, char *buf)
-{
-	return G_AT_SERVER_RESULT_ERROR;
-}
-
-static GAtServerResult parse_v250_settings(GAtServer *server, char *buf)
-{
-	return G_AT_SERVER_RESULT_ERROR;
-}
-
 static GAtServerResult server_parse_line(GAtServer *server, char *line)
 {
-	gsize i = 0;
-	char c;
 	GAtServerResult res = G_AT_SERVER_RESULT_ERROR;
 
-	if (line == NULL)
-		goto done;
-
-	if (line[0] == '\0') {
-		res = G_AT_SERVER_RESULT_OK;
-		goto done;
-	}
-
-	c = line[i];
-	/* skip semicolon */
-	if (c == ';')
-		c = line[++i];
-
-	if (is_at_command_prefix(c))
-		res = parse_at_command(server, line + i);
-	else if (g_ascii_isalpha(c) || c == '&')
-		res = parse_v250_settings(server, line + i);
-
-done:
-	g_free(line);
 	return res;
 }
 
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-03-04  1:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 14:56 [PATCH 1/7] Remove old server_parse_line Zhenhua Zhang
2010-03-03 14:56 ` [PATCH 2/7] Add framework of server parser Zhenhua Zhang
2010-03-03 14:56   ` [PATCH 3/7] Add basic command parsing Zhenhua Zhang
2010-03-03 14:56     ` [PATCH 4/7] Add extended " Zhenhua Zhang
2010-03-03 14:56       ` [PATCH 5/7] Add server at command data structure Zhenhua Zhang
2010-03-03 14:56         ` [PATCH 6/7] Add notify at command callback Zhenhua Zhang
2010-03-03 14:56           ` [PATCH 7/7] Add g_at_server_register to register callback Zhenhua Zhang
2010-03-03 19:28             ` Denis Kenzior
2010-03-04  1:41               ` Zhenhua Zhang
2010-03-03 19:23         ` [PATCH 5/7] Add server at command data structure Denis Kenzior
2010-03-04  1:40           ` Zhenhua Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.