Clean up the implicit-function-declaration warning in
CoapHttpHandler.c. The compiler is not finding the
OCParsePayload function so it is interpreting it as a
function that takes 4 parameters and returns an int.
This is a result of how old C compilers handle
implicit-functions.
The fact that OCParsePayload was used incorrectly was hidden
it should have 5 parameters not 4. The code now includes the
internal header ocpayloadcbor.h and fixes the call to
OCParsePayload.
Change-Id: I894e3d423617c15c1ce2cf35825637984d1babd8
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21459
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit
35bcc24dde8e62832360092fa4da44b60e24305f)
#include "logger.h"
#include <coap/pdu.h>
#include "ocpayload.h"
+#include "internal/ocpayloadcbor.h"
#include "uarraylist.h"
#include "CoapHttpParser.h"
#include "CoapHttpMap.h"
{
case OC_FORMAT_CBOR:
OIC_LOG(DEBUG, TAG, "Payload format is CBOR");
- result = OCParsePayload(&response.payload, PAYLOAD_TYPE_REPRESENTATION,
+ result = OCParsePayload(&response.payload, OC_FORMAT_CBOR, PAYLOAD_TYPE_REPRESENTATION,
httpResponse->payload, httpResponse->payloadLength);
if (result != OC_STACK_OK)
{