You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/12/14 05:40:39 UTC
incubator-mynewt-core git commit: oic;
reduce the number of oc_message_t's to 1.
Repository: incubator-mynewt-core
Updated Branches:
refs/heads/develop 1644f022a -> d8c00637e
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/d8c00637
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/d8c00637
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/d8c00637
Branch: refs/heads/develop
Commit: d8c00637eb2766809a93f0657c003c1f6835f6c4
Parents: 1644f02
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Dec 13 21:39:00 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Dec 13 21:39:00 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/d8c00637/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);
}