Repository: incubator-mynewt-core Updated Branches: refs/heads/develop b8380e947 -> 832fa2d5f
net/oic; fix compilation errors with clang. Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/b1465b52 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/b1465b52 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/b1465b52 Branch: refs/heads/develop Commit: b1465b52f4b4252cfd2eb16a067d7559b8336d5c Parents: b8380e9 Author: Marko Kiiskila <[email protected]> Authored: Mon Apr 3 19:44:55 2017 -0700 Committer: Marko Kiiskila <[email protected]> Committed: Mon Apr 3 19:44:55 2017 -0700 ---------------------------------------------------------------------- net/oic/include/oic/oc_ri.h | 21 +++++++++------------ net/oic/src/messaging/coap/observe.h | 2 +- net/oic/src/messaging/coap/separate.h | 12 ++++++------ 3 files changed, 16 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b1465b52/net/oic/include/oic/oc_ri.h ---------------------------------------------------------------------- diff --git a/net/oic/include/oic/oc_ri.h b/net/oic/include/oic/oc_ri.h index d2f0f2e..98e1b4b 100644 --- a/net/oic/include/oic/oc_ri.h +++ b/net/oic/include/oic/oc_ri.h @@ -61,14 +61,12 @@ typedef enum { OC_IGNORE } oc_status_t; -typedef struct oc_separate_response oc_separate_response_t; +struct oc_separate_response; +struct oc_response_buffer; -typedef struct oc_response_buffer oc_response_buffer_t; - -typedef struct -{ - oc_separate_response_t *separate_response; - oc_response_buffer_t *response_buffer; +typedef struct oc_response { + struct oc_separate_response *separate_response; + struct oc_response_buffer *response_buffer; } oc_response_t; typedef enum { @@ -95,11 +93,9 @@ typedef enum { #define NUM_OC_CORE_RESOURCES (__NUM_OC_CORE_RESOURCES__ + MAX_NUM_DEVICES) -typedef struct oc_resource oc_resource_t; - typedef struct oc_request { oc_endpoint_t *origin; - oc_resource_t *resource; + struct oc_resource *resource; const char *query; int query_len; oc_response_t *response; @@ -149,10 +145,11 @@ int oc_ri_get_query_value(const char *query, int query_len, const char *key, oc_interface_mask_t oc_ri_get_interface_mask(char *iface, int if_len); -typedef struct coap_packet coap_packet_t; struct coap_packet_rx; +struct coap_packet; bool oc_ri_invoke_coap_entity_handler(struct coap_packet_rx *request, - coap_packet_t *response, int32_t *offset, + struct coap_packet *response, + int32_t *offset, oc_endpoint_t *endpoint); #ifdef __cplusplus http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b1465b52/net/oic/src/messaging/coap/observe.h ---------------------------------------------------------------------- diff --git a/net/oic/src/messaging/coap/observe.h b/net/oic/src/messaging/coap/observe.h index d342cac..475c5c6 100644 --- a/net/oic/src/messaging/coap/observe.h +++ b/net/oic/src/messaging/coap/observe.h @@ -70,7 +70,7 @@ int coap_remove_observer_by_uri(oc_endpoint_t *endpoint, const char *uri); int coap_remove_observer_by_mid(oc_endpoint_t *endpoint, uint16_t mid); int coap_notify_observers(oc_resource_t *resource, - oc_response_buffer_t *response_buf, + struct oc_response_buffer *response_buf, oc_endpoint_t *endpoint); // int coap_notify_observers_sub(oc_resource_t *resource, const char *subpath); http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/b1465b52/net/oic/src/messaging/coap/separate.h ---------------------------------------------------------------------- diff --git a/net/oic/src/messaging/coap/separate.h b/net/oic/src/messaging/coap/separate.h index 987ead9..ab4f2cd 100644 --- a/net/oic/src/messaging/coap/separate.h +++ b/net/oic/src/messaging/coap/separate.h @@ -64,15 +64,15 @@ typedef struct coap_separate { oc_endpoint_t endpoint; } coap_separate_t; -typedef struct coap_packet coap_packet_t; +struct coap_packet; int coap_separate_accept(struct coap_packet_rx *request, - oc_separate_response_t *separate_response, + struct oc_separate_response *separate_response, oc_endpoint_t *endpoint, int observe); -void coap_separate_resume(coap_packet_t *response, - coap_separate_t *separate_store, +void coap_separate_resume(struct coap_packet *response, + struct coap_separate *separate_store, uint8_t code, uint16_t mid); -void coap_separate_clear(oc_separate_response_t *separate_response, - coap_separate_t *separate_store); +void coap_separate_clear(struct oc_separate_response *separate_response, + struct coap_separate *separate_store); void coap_separate_init(void);
