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 2017/03/27 22:23:45 UTC

[1/2] incubator-mynewt-core git commit: net/oic; don't send confirmable requests over TCP-like transports.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 133a628fd -> e62a2458c


net/oic; don't send confirmable requests over TCP-like transports.


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

Branch: refs/heads/develop
Commit: 9d8c6f27c3fbc2d58c2eff24cf0a6ad3039598b7
Parents: 133a628
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Mar 27 15:21:37 2017 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Mar 27 15:21:37 2017 -0700

----------------------------------------------------------------------
 net/oic/src/messaging/coap/observe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/9d8c6f27/net/oic/src/messaging/coap/observe.c
----------------------------------------------------------------------
diff --git a/net/oic/src/messaging/coap/observe.c b/net/oic/src/messaging/coap/observe.c
index 4369360..a262465 100644
--- a/net/oic/src/messaging/coap/observe.c
+++ b/net/oic/src/messaging/coap/observe.c
@@ -278,7 +278,8 @@ coap_notify_observers(oc_resource_t *resource,
                 coap_init_message(notification, COAP_TYPE_NON, CONTENT_2_05, 0);
 
                 notification->mid = transaction->mid;
-                if (obs->obs_counter % COAP_OBSERVE_REFRESH_INTERVAL == 0) {
+                if (!oc_endpoint_use_tcp(&obs->endpoint) &&
+                    obs->obs_counter % COAP_OBSERVE_REFRESH_INTERVAL == 0) {
                     OC_LOG_DEBUG("coap_observe_notify: forcing CON "
                                  "notification to check for client liveness\n");
                     notification->type = COAP_TYPE_CON;


[2/2] incubator-mynewt-core git commit: net/oic; use hal_bsp_dev_id() to generate platform uuid.

Posted by ma...@apache.org.
net/oic; use hal_bsp_dev_id() to generate platform uuid.


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

Branch: refs/heads/develop
Commit: e62a2458c2d8835bd8f5c532573ece4534532f57
Parents: 9d8c6f2
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Mar 27 15:22:59 2017 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Mar 27 15:22:59 2017 -0700

----------------------------------------------------------------------
 net/oic/src/api/oc_uuid.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e62a2458/net/oic/src/api/oc_uuid.c
----------------------------------------------------------------------
diff --git a/net/oic/src/api/oc_uuid.c b/net/oic/src/api/oc_uuid.c
index 2ceaf7a..e0244fb 100644
--- a/net/oic/src/api/oc_uuid.c
+++ b/net/oic/src/api/oc_uuid.c
@@ -15,12 +15,13 @@
 */
 
 #include "oc_uuid.h"
-#include "port/oc_random.h"
 #include <ctype.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <string.h>
 
+#include <hal/hal_bsp.h>
+
 void
 oc_str_to_uuid(const char *str, oc_uuid_t *uuid)
 {
@@ -92,17 +93,11 @@ oc_uuid_to_str(const oc_uuid_t *uuid, char *buffer, int buflen)
 void
 oc_gen_uuid(oc_uuid_t *uuid)
 {
-  int i;
-  uint16_t r;
-
-  for (i = 0; i < 8; i++) {
-    r = oc_random_rand();
-    memcpy((uint8_t *)&uuid->id[i * 2], (uint8_t *)&r, sizeof(r));
-  }
+  hal_bsp_hw_id(&uuid->id[0], sizeof(uuid->id));
 
   /*  From RFC 4122
       Set the two most significant bits of the
-      clock_seq_hi_and_reserved (8th octect) to
+      clock_seq_hi_and_reserved (8th octet) to
       zero and one, respectively.
   */
   uuid->id[8] &= 0x3f;