mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gcoap: include CoAP resrouces from NANOCOAP_RESOURCE() XFA
This commit is contained in:
parent
13aa272616
commit
cc30b819eb
@ -2071,7 +2071,7 @@ extern ssize_t coap_well_known_core_default_handler(coap_pkt_t *pkt, \
|
||||
* @brief Respond to `/.well-known/core` to list all resources on the server
|
||||
*/
|
||||
#ifndef CONFIG_NANOCOAP_SERVER_WELL_KNOWN_CORE
|
||||
#define CONFIG_NANOCOAP_SERVER_WELL_KNOWN_CORE (1)
|
||||
#define CONFIG_NANOCOAP_SERVER_WELL_KNOWN_CORE !IS_USED(MODULE_GCOAP)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -1409,6 +1409,17 @@ kernel_pid_t gcoap_init(void)
|
||||
gcoap_forward_proxy_init();
|
||||
}
|
||||
|
||||
#ifdef MODULE_NANOCOAP_RESOURCES
|
||||
/* add CoAP resources from XFA */
|
||||
XFA_USE_CONST(coap_resource_t, coap_resources_xfa);
|
||||
static gcoap_listener_t _xfa_listener = {
|
||||
.resources = coap_resources_xfa,
|
||||
};
|
||||
_xfa_listener.resources_len = XFA_LEN(coap_resource_t, coap_resources_xfa),
|
||||
|
||||
gcoap_register_listener(&_xfa_listener);
|
||||
#endif
|
||||
|
||||
return _pid;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user