mkiiskila closed pull request #798: net/oic; make responding oc_endpoint available to coap client response handlers URL: https://github.com/apache/mynewt-core/pull/798
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/net/oic/include/oic/oc_client_state.h b/net/oic/include/oic/oc_client_state.h index 8623ffcd8..6ad1eaa12 100644 --- a/net/oic/include/oic/oc_client_state.h +++ b/net/oic/include/oic/oc_client_state.h @@ -31,6 +31,7 @@ typedef enum { HIGH_QOS = 0, LOW_QOS } oc_qos_t; typedef struct oc_client_response { struct coap_packet_rx *packet; + struct oc_endpoint *origin; oc_status_t code; uint32_t observe_option; } oc_client_response_t; diff --git a/net/oic/src/api/oc_ri.c b/net/oic/src/api/oc_ri.c index 7edfef2bf..9636a1429 100644 --- a/net/oic/src/api/oc_ri.c +++ b/net/oic/src/api/oc_ri.c @@ -807,6 +807,7 @@ oc_ri_invoke_client_cb(struct coap_packet_rx *rsp, oc_endpoint_t *endpoint) } } else { client_response.packet = rsp; + client_response.origin = endpoint; handler = (oc_response_handler_t)cb->handler; handler(&client_response); } ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services