Skip to content

Commit

Permalink
locking: Add missing COAP_API
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdeep1 committed Jun 5, 2024
1 parent 782e607 commit dec13f9
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion include/coap3/coap_async.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ COAP_API void coap_async_trigger(coap_async_t *async);
* @param session The session to use.
* @param async The object to delete.
*/
void coap_free_async(coap_session_t *session, coap_async_t *async);
COAP_API void coap_free_async(coap_session_t *session, coap_async_t *async);

/**
* Retrieves the object identified by @p token from the list of asynchronous
Expand Down
4 changes: 3 additions & 1 deletion include/coap3/coap_net_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,13 @@ int coap_insert_node(coap_queue_t **queue, coap_queue_t *node);
/**
* Destroys specified @p node.
*
* Note: Not a part of the Public API.
*
* @param node Node entry to remove.
*
* @return @c 1 node deleted from queue, @c 0 failure.
*/
int coap_delete_node(coap_queue_t *node);
COAP_API int coap_delete_node(coap_queue_t *node);

/**
* Destroys specified @p node.
Expand Down
10 changes: 5 additions & 5 deletions include/coap3/coap_oscore.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ int coap_oscore_is_supported(void);
* @return A new CoAP session or NULL if failed. Call coap_session_release()
* to free.
*/
coap_session_t *coap_new_client_session_oscore(coap_context_t *ctx,
const coap_address_t *local_if,
const coap_address_t *server,
coap_proto_t proto,
coap_oscore_conf_t *oscore_conf);
COAP_API coap_session_t *coap_new_client_session_oscore(coap_context_t *ctx,
const coap_address_t *local_if,
const coap_address_t *server,
coap_proto_t proto,
coap_oscore_conf_t *oscore_conf);

/**
* Creates a new client session to the designated server with PSK credentials
Expand Down
23 changes: 11 additions & 12 deletions include/coap3/coap_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,11 @@ COAP_API size_t coap_session_max_pdu_size(const coap_session_t *session);
*
* @return A new CoAP session or NULL if failed. Call coap_session_release to free.
*/
COAP_API coap_session_t *coap_new_client_session(
coap_context_t *ctx,
const coap_address_t *local_if,
const coap_address_t *server,
coap_proto_t proto
);
COAP_API coap_session_t *coap_new_client_session(coap_context_t *ctx,
const coap_address_t *local_if,
const coap_address_t *server,
coap_proto_t proto
);

/**
* Creates a new client session to the designated server with PSK credentials
Expand Down Expand Up @@ -303,12 +302,12 @@ COAP_API coap_session_t *coap_new_client_session_psk(coap_context_t *ctx,
* @return A new CoAP session or NULL if failed. Call coap_session_release()
* to free.
*/
coap_session_t *coap_new_client_session_psk2(coap_context_t *ctx,
const coap_address_t *local_if,
const coap_address_t *server,
coap_proto_t proto,
coap_dtls_cpsk_t *setup_data
);
COAP_API coap_session_t *coap_new_client_session_psk2(coap_context_t *ctx,
const coap_address_t *local_if,
const coap_address_t *server,
coap_proto_t proto,
coap_dtls_cpsk_t *setup_data
);

/**
* Get the server session's current Identity Hint (PSK).
Expand Down
2 changes: 1 addition & 1 deletion src/coap_async.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ coap_free_async_sub(coap_context_t *context, coap_async_t *s) {
}
}

void
COAP_API void
coap_free_async(coap_session_t *session, coap_async_t *async) {
coap_lock_lock(session->context, return);
coap_free_async_lkd(session, async);
Expand Down
6 changes: 3 additions & 3 deletions src/coap_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ coap_insert_node(coap_queue_t **queue, coap_queue_t *node) {
return 1;
}

int
COAP_API int
coap_delete_node(coap_queue_t *node) {
int ret;
#if COAP_THREAD_SAFE
Expand Down Expand Up @@ -4257,7 +4257,7 @@ coap_event_name(coap_event_t event) {
}
#endif /* COAP_MAX_LOGGING_LEVEL >= _COAP_LOG_DEBUG */

int
COAP_API int
coap_handle_event(coap_context_t *context, coap_event_t event,
coap_session_t *session) {
int ret;
Expand Down Expand Up @@ -4754,7 +4754,7 @@ coap_mcast_set_hops(coap_session_t *session, size_t hops) {
#endif /* COAP_CLIENT_SUPPORT */

#else /* defined WITH_CONTIKI || defined WITH_LWIP */
int
COAP_API int
coap_join_mcast_group_intf(coap_context_t *ctx COAP_UNUSED,
const char *group_name COAP_UNUSED,
const char *ifname COAP_UNUSED) {
Expand Down

0 comments on commit dec13f9

Please sign in to comment.