Open Source Telephony
 help / color / mirror / Atom feed
From: Zhenhua Zhang <zhenhua.zhang@intel.com>
To: ofono@ofono.org
Subject: Re: [PATCH 01/11] Rename g_at_server_send_result
Date: Wed, 17 Mar 2010 22:38:49 +0800	[thread overview]
Message-ID: <4BA0E979.1030004@intel.com> (raw)
In-Reply-To: <1268836241-4834-1-git-send-email-zhenhua.zhang@intel.com>

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

Hi

On 03/17/2010 10:30 PM, Zhang, Zhenhua wrote:
> Rename it to g_at_server_send_final.
> ---
>   gatchat/gatserver.c |    6 +++---
>   1 files changed, 3 insertions(+), 3 deletions(-)
>

Sorry, I forgot the first patch. Please review the first patch as 
attached. Otherwise, these patches could not be applied.

Thanks.
Zhenhua


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Remove-old-server_parse_line.patch --]
[-- Type: text/x-patch, Size: 1748 bytes --]

>From 588126076e1fc10f57b75afe734d51046ab46d6d Mon Sep 17 00:00:00 2001
From: Zhenhua Zhang <zhenhua.zhang@intel.com>
Date: Wed, 17 Mar 2010 16:36:22 +0800
Subject: [PATCH] Remove old server_parse_line

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

diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
index 079451f..7577de2 100644
--- a/gatchat/gatserver.c
+++ b/gatchat/gatserver.c
@@ -173,57 +173,8 @@ 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 void parse_at_command(GAtServer *server, char *buf)
-{
-	g_at_server_send_result(server, G_AT_SERVER_RESULT_ERROR);
-}
-
-static void parse_v250_settings(GAtServer *server, char *buf)
-{
-	g_at_server_send_result(server, G_AT_SERVER_RESULT_ERROR);
-}
-
 static void server_parse_line(GAtServer *server, char *line)
 {
-	gsize i = 0;
-	char c;
-
-	if (line == NULL) {
-		g_at_server_send_result(server, G_AT_SERVER_RESULT_ERROR);
-		goto done;
-	}
-
-	if (line[0] == '\0') {
-		g_at_server_send_result(server, G_AT_SERVER_RESULT_OK);
-		goto done;
-	}
-
-	c = line[i];
-	/* skip semicolon */
-	if (c == ';')
-		c = line[++i];
-
-	if (is_at_command_prefix(c) || c == 'A' || c == 'D' || c == 'H')
-		parse_at_command(server, line + i);
-	else if (g_ascii_isalpha(c) || c == '&')
-		parse_v250_settings(server, line + i);
-	else
-		g_at_server_send_result(server, G_AT_SERVER_RESULT_ERROR);
-
-done:
 	g_free(line);
 }
 
-- 
1.6.6.1


  parent reply	other threads:[~2010-03-17 14:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17 14:30 [PATCH 01/11] Rename g_at_server_send_result Zhenhua Zhang
2010-03-17 14:30 ` [PATCH 02/11] Add framework of server parser Zhenhua Zhang
2010-03-17 14:30   ` [PATCH 03/11] Add basic command parsing Zhenhua Zhang
2010-03-17 14:30     ` [PATCH 04/11] Add extended " Zhenhua Zhang
2010-03-17 14:30       ` [PATCH 05/11] Add server at command data structure Zhenhua Zhang
2010-03-17 14:30         ` [PATCH 06/11] Add notify at command callback Zhenhua Zhang
2010-03-17 14:30           ` [PATCH 07/11] Add g_at_server_register and unregister callback Zhenhua Zhang
2010-03-17 14:30             ` [PATCH 08/11] Add G_AT_SERVER_RESULT_EXT_ERROR Zhenhua Zhang
2010-03-17 14:30               ` [PATCH 09/11] Fix do not emit error if extended error has emitted Zhenhua Zhang
2010-03-17 14:30                 ` [PATCH 10/11] Refactor g_at_server_send_final Zhenhua Zhang
2010-03-17 14:30                   ` [PATCH 11/11] Add utilities to send server response Zhenhua Zhang
2010-03-17 18:23           ` [PATCH 06/11] Add notify at command callback Denis Kenzior
2010-03-17 18:02     ` [PATCH 03/11] Add basic command parsing Denis Kenzior
2010-03-17 17:55   ` [PATCH 02/11] Add framework of server parser Denis Kenzior
2010-03-17 14:38 ` Zhenhua Zhang [this message]
2010-03-17 18:24   ` [PATCH 01/11] Rename g_at_server_send_result Denis Kenzior

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=4BA0E979.1030004@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox