vrahane commented on a change in pull request #2300:
URL: https://github.com/apache/mynewt-core/pull/2300#discussion_r432202610



##########
File path: net/oic/src/messaging/coap/engine.c
##########
@@ -231,17 +231,19 @@ coap_receive(struct os_mbuf **mp)
             }
             transaction->type = response->type;
         }
-    } else { // Fix this
-        /* handle responses */
-        if (message->type == COAP_TYPE_CON) {
-            erbium_status_code = EMPTY_ACK_RESPONSE;
-        } else if (message->type == COAP_TYPE_ACK) {
-            /* transactions are closed through lookup below */
-        } else if (message->type == COAP_TYPE_RST) {
+    } else {
+        if (!oc_endpoint_use_tcp(&endpoint)) {
+            /* handle responses */
+            if (message->type == COAP_TYPE_CON) {
+                erbium_status_code = EMPTY_ACK_RESPONSE;
+            } else if (message->type == COAP_TYPE_ACK) {
+                /* transactions are closed through lookup below */
+            } else if (message->type == COAP_TYPE_RST) {
 #ifdef OC_SERVER
-            /* cancel possible subscriptions */
-            coap_remove_observer_by_mid(OC_MBUF_ENDPOINT(m), message->mid);
+                /* cancel possible subscriptions */

Review comment:
       more spaces than required




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to