Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2012-06-10 14:22:08 -0400
committerEugene Tarassov2012-06-10 14:22:08 -0400
commit3f17fa631a2f5ef460c2d6a07b1cc04d29dd6544 (patch)
tree39fd8c22ef86d955965cdddc33c162b077e5a394 /agent/tcf/services/stacktrace.c
parent8a762eb04fc0a8a006d6ea65b155e02c355430b6 (diff)
downloadorg.eclipse.tcf.agent-3f17fa631a2f5ef460c2d6a07b1cc04d29dd6544.tar.gz
org.eclipse.tcf.agent-3f17fa631a2f5ef460c2d6a07b1cc04d29dd6544.tar.xz
org.eclipse.tcf.agent-3f17fa631a2f5ef460c2d6a07b1cc04d29dd6544.zip
TCF Agent: new function in JSON API: json_test_char
Diffstat (limited to 'agent/tcf/services/stacktrace.c')
-rw-r--r--agent/tcf/services/stacktrace.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/agent/tcf/services/stacktrace.c b/agent/tcf/services/stacktrace.c
index 1e387a8b..3eae56d2 100644
--- a/agent/tcf/services/stacktrace.c
+++ b/agent/tcf/services/stacktrace.c
@@ -289,8 +289,8 @@ static void command_get_context(char * token, Channel * c) {
CommandGetContextArgs args;
args.ids = json_read_alloc_string_array(&c->inp, &args.id_cnt);
- if (read_stream(&c->inp) != 0) exception(ERR_JSON_SYNTAX);
- if (read_stream(&c->inp) != MARKER_EOM) exception(ERR_JSON_SYNTAX);
+ json_test_char(&c->inp, MARKER_EOA);
+ json_test_char(&c->inp, MARKER_EOM);
args.data = (CommandGetContextData *)loc_alloc(sizeof(CommandGetContextData) * args.id_cnt);
strlcpy(args.token, token, sizeof(args.token));
@@ -348,8 +348,8 @@ static void command_get_children(char * token, Channel * c) {
CommandGetChildrenArgs args;
json_read_string(&c->inp, args.id, sizeof(args.id));
- if (read_stream(&c->inp) != 0) exception(ERR_JSON_SYNTAX);
- if (read_stream(&c->inp) != MARKER_EOM) exception(ERR_JSON_SYNTAX);
+ json_test_char(&c->inp, MARKER_EOA);
+ json_test_char(&c->inp, MARKER_EOM);
strlcpy(args.token, token, sizeof(args.token));
cache_enter(command_get_children_cache_client, c, &args, sizeof(args));

Back to the top