From: Srikrishna Gurugubelli Date: Fri, 27 Jan 2017 18:11:18 +0000 (-0800) Subject: [IOT-1782] fixing protocol enumeration for use in introspection response. X-Git-Tag: 1.3.0~747 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b75001fb964ecbc6f7dd1ab23c56107b2b58d4df;p=platform%2Fupstream%2Fiotivity.git [IOT-1782] fixing protocol enumeration for use in introspection response. Change-Id: I06a55b629a383ba1f47dab384bae3e45097b51af Signed-off-by: Srikrishna Gurugubelli Reviewed-on: https://gerrit.iotivity.org/gerrit/16841 Reviewed-by: Alex Kelley Reviewed-by: Dave Thaler Tested-by: jenkins-iotivity Reviewed-by: Dan Mihai Reviewed-by: Ziran Sun --- diff --git a/resource/csdk/stack/src/ocresource.c b/resource/csdk/stack/src/ocresource.c index 2cd0681..383bf42 100755 --- a/resource/csdk/stack/src/ocresource.c +++ b/resource/csdk/stack/src/ocresource.c @@ -764,15 +764,15 @@ OCStackResult BuildIntrospectionResponseRepresentation(const OCResource *resourc goto exit; } - // figure out which protocols this endpoint supports - if (resourcePtr->endpointType | OC_COAP) + // Figure out which protocols this endpoint supports + if (resourcePtr->endpointType & OC_COAP) { if (OC_STACK_OK == AddProtocolToLL(&protoLL, COAP_STR)) { dimensions[0]++; } } - if (resourcePtr->endpointType | OC_COAPS) + if (resourcePtr->endpointType & OC_COAPS) { if (OC_STACK_OK == AddProtocolToLL(&protoLL, COAPS_STR)) { @@ -780,14 +780,14 @@ OCStackResult BuildIntrospectionResponseRepresentation(const OCResource *resourc } } #ifdef TCP_ADAPTER - if (resourcePtr->endpointType | OC_COAP_TCP) + if (resourcePtr->endpointType & OC_COAP_TCP) { if (OC_STACK_OK == AddProtocolToLL(&protoLL, COAP_STR)) { dimensions[0]++; } } - if (resourcePtr->endpointType | OC_COAPS_TCP) + if (resourcePtr->endpointType & OC_COAPS_TCP) { if (OC_STACK_OK == AddProtocolToLL(&protoLL, COAPS_STR)) { @@ -796,14 +796,14 @@ OCStackResult BuildIntrospectionResponseRepresentation(const OCResource *resourc } #endif #ifdef HTTP_ADAPTER - if (resourcePtr->endpointType | OC_HTTP) + if (resourcePtr->endpointType & OC_HTTP) { if (OC_STACK_OK == AddProtocolToLL(&protoLL, HTTP_STR)) { dimensions[0]++; } } - if (resourcePtr->endpointType | OC_HTTPS) + if (resourcePtr->endpointType & OC_HTTPS) { if (OC_STACK_OK == AddProtocolToLL(&protoLL, HTTPS_STR)) { @@ -812,7 +812,7 @@ OCStackResult BuildIntrospectionResponseRepresentation(const OCResource *resourc } #endif #ifdef EDR_ADAPTER - if (resourcePtr->endpointType | OC_COAP_RFCOMM) + if (resourcePtr->endpointType & OC_COAP_RFCOMM) { if (OC_STACK_OK == AddProtocolToLL(&protoLL, COAP_STR)) {