From: Yang Gu <gyagp0@gmail.com>
To: ofono@ofono.org
Subject: [PATCH 1/8] stk: Make parse_dataobj not consume extra data
Date: Wed, 26 May 2010 22:39:07 +0800 [thread overview]
Message-ID: <1274884754-12977-1-git-send-email-yang.gu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
---
src/stkutil.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/stkutil.c b/src/stkutil.c
index 016bde9..fd5b7c6 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -2023,6 +2023,7 @@ static gboolean parse_dataobj(struct comprehension_tlv_iter *iter,
GSList *l;
va_list args;
gboolean minimum_set = TRUE;
+ struct comprehension_tlv_iter iter_old;
va_start(args, type);
@@ -2056,11 +2057,14 @@ static gboolean parse_dataobj(struct comprehension_tlv_iter *iter,
if (handler(iter, entry->data))
entry->parsed = TRUE;
+ comprehension_tlv_iter_copy(iter, &iter_old);
+
if (comprehension_tlv_iter_next(iter) == FALSE)
break;
}
}
+ comprehension_tlv_iter_copy(&iter_old, iter);
out:
for (l = entries; l; l = l->next) {
struct dataobj_handler_entry *entry = l->data;
@@ -2293,6 +2297,9 @@ static GSList *parse_item_list(struct comprehension_tlv_iter *iter)
struct stk_item item;
GSList *list = NULL;
+ if (comprehension_tlv_iter_next(iter) != TRUE)
+ return NULL;
+
if (comprehension_tlv_iter_get_tag(iter) != tag)
return NULL;
--
1.7.0.4
next reply other threads:[~2010-05-26 14:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 14:39 Yang Gu [this message]
2010-05-26 14:39 ` [PATCH 2/8] stk: Add parser for launch browser commands Yang Gu
2010-05-26 14:39 ` [PATCH 3/8] teststk: Add check of len in byte array Yang Gu
2010-05-26 14:39 ` [PATCH 4/8] teststk: Use check_common_text() to check string Yang Gu
2010-05-26 14:39 ` [PATCH 5/8] stk: Fix the parser of send sms Yang Gu
2010-05-26 14:39 ` [PATCH 6/8] teststk: Add cases for send sms parser Yang Gu
2010-05-26 14:39 ` [PATCH 7/8] teststk: Add test for launch browser parser Yang Gu
2010-05-26 14:39 ` [PATCH 8/8] Move destructor prior to return Yang Gu
2010-05-27 17:48 ` [PATCH 1/8] stk: Make parse_dataobj not consume extra data 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=1274884754-12977-1-git-send-email-yang.gu@intel.com \
--to=gyagp0@gmail.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.