oic; reduce the number of oc_message_t's to 1.

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/f0627330
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/f0627330
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/f0627330

Branch: refs/heads/sensors_branch
Commit: f06273307eb3c7ad69e03e0dc780b8a56c9a3423
Parents: 6331a5e
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Dec 13 21:39:00 2016 -0800
Committer: Sterling Hughes <sterl...@apache.org>
Committed: Sun Dec 18 13:56:17 2016 -0800

----------------------------------------------------------------------
 net/oic/src/api/oc_buffer.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/f0627330/net/oic/src/api/oc_buffer.c
----------------------------------------------------------------------
diff --git a/net/oic/src/api/oc_buffer.c b/net/oic/src/api/oc_buffer.c
index 6fb6beb..3e3cf8f 100644
--- a/net/oic/src/api/oc_buffer.c
+++ b/net/oic/src/api/oc_buffer.c
@@ -33,8 +33,7 @@
 #include "port/mynewt/adaptor.h"
 
 static struct os_mempool oc_buffers;
-static uint8_t oc_buffer_area[OS_MEMPOOL_BYTES(MAX_NUM_CONCURRENT_REQUESTS * 2,
-      sizeof(oc_message_t))];
+static uint8_t oc_buffer_area[OS_MEMPOOL_BYTES(1, sizeof(oc_message_t))];
 
 static struct os_mqueue oc_inq;
 static struct os_mqueue oc_outq;
@@ -197,8 +196,8 @@ free_msg:
 void
 oc_buffer_init(void)
 {
-    os_mempool_init(&oc_buffers, MAX_NUM_CONCURRENT_REQUESTS * 2,
-      sizeof(oc_message_t), oc_buffer_area, "oc_bufs");
+    os_mempool_init(&oc_buffers, 1, sizeof(oc_message_t), oc_buffer_area,
+                    "oc_bufs");
     os_mqueue_init(&oc_inq, oc_buffer_rx, NULL);
     os_mqueue_init(&oc_outq, oc_buffer_tx, NULL);
 }

Reply via email to