net: lwm2m: remove net_context parameter from lwm2m_udp_receive()

This is part of lwm2m_ctx and is not needed.

Signed-off-by: Michael Scott <michael.scott@linaro.org>
This commit is contained in:
Michael Scott 2017-08-24 09:30:39 -07:00 committed by Jukka Rissanen
commit aa3e52c261
3 changed files with 6 additions and 7 deletions

View file

@ -2236,8 +2236,7 @@ int lwm2m_udp_sendto(struct net_pkt *pkt, const struct sockaddr *dst_addr)
NULL, K_NO_WAIT, NULL, NULL);
}
void lwm2m_udp_receive(struct lwm2m_ctx *client_ctx,
struct net_context *net_ctx, struct net_pkt *pkt,
void lwm2m_udp_receive(struct lwm2m_ctx *client_ctx, struct net_pkt *pkt,
bool handle_separate_response,
int (*udp_request_handler)(struct zoap_packet *,
struct zoap_packet *,
@ -2313,7 +2312,8 @@ void lwm2m_udp_receive(struct lwm2m_ctx *client_ctx,
if (udp_request_handler &&
zoap_header_get_type(&response) == ZOAP_TYPE_CON) {
/* Create a response packet if we reach this point */
r = lwm2m_init_message(net_ctx, &response2, &pkt2,
r = lwm2m_init_message(client_ctx->net_ctx,
&response2, &pkt2,
ZOAP_TYPE_ACK,
zoap_header_get_code(&response),
zoap_header_get_id(&response),
@ -2375,7 +2375,7 @@ static void udp_receive(struct net_context *net_ctx, struct net_pkt *pkt,
struct lwm2m_ctx,
net_ctx);
lwm2m_udp_receive(client_ctx, net_ctx, pkt, false, handle_request);
lwm2m_udp_receive(client_ctx, pkt, false, handle_request);
}
static void retransmit_request(struct k_work *work)

View file

@ -66,8 +66,7 @@ int lwm2m_write_handler(struct lwm2m_engine_obj_inst *obj_inst,
struct lwm2m_engine_context *context);
int lwm2m_udp_sendto(struct net_pkt *pkt, const struct sockaddr *dst_addr);
void lwm2m_udp_receive(struct lwm2m_ctx *client_ctx,
struct net_context *ctx, struct net_pkt *pkt,
void lwm2m_udp_receive(struct lwm2m_ctx *client_ctx, struct net_pkt *pkt,
bool handle_separate_response,
int (*udp_request_handler)(struct zoap_packet *request,
struct zoap_packet *response,

View file

@ -40,7 +40,7 @@ static void
firmware_udp_receive(struct net_context *ctx, struct net_pkt *pkt, int status,
void *user_data)
{
lwm2m_udp_receive(&firmware_ctx, ctx, pkt, true, NULL);
lwm2m_udp_receive(&firmware_ctx, pkt, true, NULL);
}
static void retransmit_request(struct k_work *work)