You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by vi...@apache.org on 2016/10/10 19:26:19 UTC

[03/50] [abbrv] incubator-mynewt-core git commit: iotivity; fix handling multiple query arguments.

iotivity; fix handling multiple query arguments.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/c1aab985
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/c1aab985
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/c1aab985

Branch: refs/heads/sterly_refactor
Commit: c1aab9858b80893d52eec2563ca0180f69af1e43
Parents: 5e92585
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Sep 20 14:08:00 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Sep 20 14:08:00 2016 -0700

----------------------------------------------------------------------
 libs/iotivity/src/api/oc_ri.c         | 2 +-
 libs/iotivity/src/api/oc_server_api.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c1aab985/libs/iotivity/src/api/oc_ri.c
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/api/oc_ri.c b/libs/iotivity/src/api/oc_ri.c
index 7af353e..76d7ed2 100644
--- a/libs/iotivity/src/api/oc_ri.c
+++ b/libs/iotivity/src/api/oc_ri.c
@@ -168,7 +168,7 @@ oc_ri_get_query_value(const char *query, int query_len, const char *key,
   int next_pos = 0, found = -1, kl, vl;
   char *k;
   while (next_pos < query_len) {
-    next_pos = oc_ri_get_query_nth_key_value(
+    next_pos += oc_ri_get_query_nth_key_value(
       query + next_pos, query_len - next_pos, &k, &kl, value, &vl, 1);
     if (next_pos == -1)
       return -1;

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/c1aab985/libs/iotivity/src/api/oc_server_api.c
----------------------------------------------------------------------
diff --git a/libs/iotivity/src/api/oc_server_api.c b/libs/iotivity/src/api/oc_server_api.c
index 8650d27..054a91c 100644
--- a/libs/iotivity/src/api/oc_server_api.c
+++ b/libs/iotivity/src/api/oc_server_api.c
@@ -219,7 +219,7 @@ oc_interate_query(oc_request_t *request, char **key, int *key_len, char **value,
 {
   if (query_iterator >= request->query_len)
     return -1;
-  query_iterator = oc_ri_get_query_nth_key_value(
+  query_iterator += oc_ri_get_query_nth_key_value(
     request->query + query_iterator, request->query_len - query_iterator, key,
     key_len, value, value_len, 1);
   return 1;