Skip to content

Commit 1eefd76

Browse files
committed
[nrf fromtree] net: lib: coap_client: Const pointers in request
CoAP client does not modify any of the members, so change all pointers to const. Signed-off-by: Seppo Takalo <[email protected]> (cherry picked from commit bc4f026)
1 parent 6d18cf2 commit 1eefd76

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

include/zephyr/net/coap_client.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ typedef void (*coap_client_response_cb_t)(int16_t result_code,
5353
* @brief Representation of a CoAP client request.
5454
*/
5555
struct coap_client_request {
56-
enum coap_method method; /**< Method of the request */
57-
bool confirmable; /**< CoAP Confirmable/Non-confirmable message */
58-
const char *path; /**< Path of the requested resource */
59-
enum coap_content_format fmt; /**< Content format to be used */
60-
uint8_t *payload; /**< User allocated buffer for send request */
61-
size_t len; /**< Length of the payload */
62-
coap_client_response_cb_t cb; /**< Callback when response received */
63-
struct coap_client_option *options; /**< Extra options to be added to request */
64-
uint8_t num_options; /**< Number of extra options */
65-
void *user_data; /**< User provided context */
56+
enum coap_method method; /**< Method of the request */
57+
bool confirmable; /**< CoAP Confirmable/Non-confirmable message */
58+
const char *path; /**< Path of the requested resource */
59+
enum coap_content_format fmt; /**< Content format to be used */
60+
const uint8_t *payload; /**< User allocated buffer for send request */
61+
size_t len; /**< Length of the payload */
62+
coap_client_response_cb_t cb; /**< Callback when response received */
63+
const struct coap_client_option *options; /**< Extra options to be added to request */
64+
uint8_t num_options; /**< Number of extra options */
65+
void *user_data; /**< User provided context */
6666
};
6767

6868
/**

0 commit comments

Comments
 (0)