* [PATCH] Handle right bracket in g_at_result_iter_next_unquoted_string
@ 2009-10-22 2:58 Zhang, Zhenhua
2009-10-23 18:40 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Zhang, Zhenhua @ 2009-10-22 2:58 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 854 bytes --]
Allow g_at_result_iter_next_unquoted_string to handle the bracket when parsing
string like chld (1, 2). Original, it returns '1' and '2)'. Now it returns '1'
and '2'. g_at_result_iter_close_list handles the right bracket later.
---
gatchat/gatresult.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gatchat/gatresult.c b/gatchat/gatresult.c
index 1436ae3..3d07e13 100644
--- a/gatchat/gatresult.c
+++ b/gatchat/gatresult.c
@@ -131,12 +131,12 @@ gboolean g_at_result_iter_next_unquoted_string(GAtResultIter *iter,
goto out;
}
- if (line[pos] == '"')
+ if (line[pos] == '"' || line[pos] == ')')
return FALSE;
end = pos;
- while (end < len && line[end] != ',')
+ while (end < len && line[end] != ',' && line[end] != ')')
end += 1;
iter->buf[end] = '\0';
Regards,
Zhenhua
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-23 18:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-22 2:58 [PATCH] Handle right bracket in g_at_result_iter_next_unquoted_string Zhang, Zhenhua
2009-10-23 18:40 ` Denis Kenzior
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.