From: Zhenhua Zhang <zhenhua.zhang@intel.com>
To: ofono@ofono.org
Subject: [PATCH 1/7] Remove old server_parse_line
Date: Wed, 03 Mar 2010 22:56:46 +0800 [thread overview]
Message-ID: <1267628212-14079-1-git-send-email-zhenhua.zhang@intel.com> (raw)
[-- 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
next reply other threads:[~2010-03-03 14:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 14:56 Zhenhua Zhang [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1267628212-14079-1-git-send-email-zhenhua.zhang@intel.com \
--to=zhenhua.zhang@intel.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.