From a8ac7af37ad6b4123c8fb0c4eeadff20465a5a6f Mon Sep 17 00:00:00 2001 From: Ravi kumar Veeramally Date: Thu, 13 Apr 2017 11:31:32 +0300 Subject: [PATCH] net: zoap: Remove unused helper function Commit "net: zoap: Fix memory overflow issue" fixed and implemented ./well-known/core response in a different way, so this api is not needed anymore. Change-Id: I8f945fb5842028be50ecfdef95cbe5da3189a538 Signed-off-by: Ravi kumar Veeramally --- include/net/zoap.h | 10 ---------- subsys/net/lib/zoap/zoap.c | 13 ------------- 2 files changed, 23 deletions(-) diff --git a/include/net/zoap.h b/include/net/zoap.h index 8ccba5bc097..472143f2f99 100644 --- a/include/net/zoap.h +++ b/include/net/zoap.h @@ -494,16 +494,6 @@ bool zoap_request_is_observe(const struct zoap_packet *request); */ uint8_t *zoap_packet_get_payload(struct zoap_packet *pkt, uint16_t *len); -/** - * @brief Returns the internal buffer of the CoAP packet, appending - * the COAP_MARKER to the buffer if necessary. - * - * @param pkt Packet to get (or insert) the payload - * - * @return pointer to the net_buf storing the payload. - */ -struct net_buf *zoap_packet_get_buf(struct zoap_packet *pkt); - /** * @brief Sets how much space was used by the payload. * diff --git a/subsys/net/lib/zoap/zoap.c b/subsys/net/lib/zoap/zoap.c index cfe6afb9003..8197c55486a 100644 --- a/subsys/net/lib/zoap/zoap.c +++ b/subsys/net/lib/zoap/zoap.c @@ -834,19 +834,6 @@ int zoap_packet_set_used(struct zoap_packet *pkt, uint16_t len) return 0; } -struct net_buf *zoap_packet_get_buf(struct zoap_packet *pkt) -{ - uint8_t *str; - - if (!pkt->start) { - str = net_buf_add(pkt->buf->frags, 1); - *str = COAP_MARKER; - pkt->start = str + 1; - } - - return pkt->buf->frags; -} - int zoap_add_option(struct zoap_packet *pkt, uint16_t code, const void *value, uint16_t len) {