From b5ce567ffdfd2daf939b95d2241c5b573cbe2e40 Mon Sep 17 00:00:00 2001 From: Giedrius Date: Wed, 29 Aug 2018 19:59:02 +0300 Subject: [PATCH] [api] add return code to otCoapHeaderSetPayloadMarker (#3004) --- include/openthread/coap.h | 2 +- src/core/api/coap_api.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/openthread/coap.h b/include/openthread/coap.h index f60e2e242..688d41935 100644 --- a/include/openthread/coap.h +++ b/include/openthread/coap.h @@ -371,7 +371,7 @@ otError otCoapHeaderAppendUriQueryOption(otCoapHeader *aHeader, const char *aUri * @retval OT_ERROR_NO_BUFS Header Payload Marker exceeds the buffer size. * */ -void otCoapHeaderSetPayloadMarker(otCoapHeader *aHeader); +otError otCoapHeaderSetPayloadMarker(otCoapHeader *aHeader); /** * This function sets the Message ID value. diff --git a/src/core/api/coap_api.cpp b/src/core/api/coap_api.cpp index 8355bcf3e..a120cc06e 100644 --- a/src/core/api/coap_api.cpp +++ b/src/core/api/coap_api.cpp @@ -93,9 +93,9 @@ otError otCoapHeaderAppendUriQueryOption(otCoapHeader *aHeader, const char *aUri return static_cast(aHeader)->AppendUriQueryOption(aUriQuery); } -void otCoapHeaderSetPayloadMarker(otCoapHeader *aHeader) +otError otCoapHeaderSetPayloadMarker(otCoapHeader *aHeader) { - static_cast(aHeader)->SetPayloadMarker(); + return static_cast(aHeader)->SetPayloadMarker(); } void otCoapHeaderSetMessageId(otCoapHeader *aHeader, uint16_t aMessageId)