You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2017/03/30 21:12:22 UTC

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

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/nrf_cputime
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;