SimpleClientServer application for Linux was trying to check the address of array
'clientResponse->rcvdVendorSpecificHeaderOptions' which will always evaluate to 'true'.
Corrected by removing such checks in the code.
Change-Id: Id7306af0792646887740ab3c7952d5fffe8c760b
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1454
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
OC_LOG_V(INFO, TAG, "SEQUENCE NUMBER: %d", clientResponse->sequenceNumber);
OC_LOG_V(INFO, TAG, "JSON = %s =============> Get Response", clientResponse->resJSONPayload);
- if(clientResponse->rcvdVendorSpecificHeaderOptions &&
- clientResponse->numRcvdVendorSpecificHeaderOptions)
+ if(clientResponse->numRcvdVendorSpecificHeaderOptions > 0)
{
OC_LOG (INFO, TAG, "Received vendor specific options");
uint8_t i = 0;
OC_LOG_V(INFO, TAG,"Get Response: %s \nFrom %s:%d\n",
clientResponse->resJSONPayload, clientResponse->devAddr.addr, clientResponse->devAddr.port);
- if (clientResponse->rcvdVendorSpecificHeaderOptions
- && clientResponse->numRcvdVendorSpecificHeaderOptions)
+ if (clientResponse->numRcvdVendorSpecificHeaderOptions > 0 )
{
OC_LOG (INFO, TAG, "Received vendor specific options");
uint8_t i = 0;