@@ -1530,10 +1530,14 @@ doc_handle_fetch(coap_resource_t *resource, coap_session_t *session,
15301530}
15311531
15321532static void
1533- doc_init_resources (coap_context_t * ctx , struct comm_point * cp ) {
1533+ doc_init_resources (coap_context_t * ctx , const char * resource_path , struct comm_point * cp ) {
15341534 coap_resource_t * r ;
15351535
1536- log_info ("Registering coap resource /" );
1536+ log_info ("Registering coap resource `%s`\n" , resource_path );
1537+ if (resource_path [0 ] == '/' )
1538+ {
1539+ resource_path += 1 ;
1540+ }
15371541 r = coap_resource_init (coap_make_str_const ("" ),
15381542 COAP_RESOURCE_FLAGS_NOTIFY_CON );
15391543
@@ -2000,7 +2004,9 @@ struct listen_dnsport*
20002004listen_create (struct comm_base * base , struct listen_port * ports ,
20012005 size_t bufsize , int tcp_accept_count , int tcp_idle_timeout ,
20022006 int harden_large_queries , uint32_t http_max_streams ,
2003- char * http_endpoint , int http_notls , struct tcl_list * tcp_conn_limit ,
2007+ char * http_endpoint , int http_notls ,
2008+ char * coap_endpoint ,
2009+ struct tcl_list * tcp_conn_limit ,
20042010 void * dot_sslctx , void * doh_sslctx , void * quic_sslctx ,
20052011 struct dt_env * dtenv ,
20062012 struct doq_table * doq_table ,
@@ -2036,7 +2042,7 @@ listen_create(struct comm_base* base, struct listen_port* ports,
20362042 front -> udp_buff , ports -> pp2_enabled , cb ,
20372043 cb_arg , ports -> socket );
20382044 cp -> coap_context = ports -> coap_context ;
2039- doc_init_resources (cp -> coap_context , cp );
2045+ doc_init_resources (cp -> coap_context , coap_endpoint , cp );
20402046#endif /* HAVE_COAP */
20412047 } else if (ports -> ftype == listen_type_doq ) {
20422048#ifndef HAVE_NGTCP2
0 commit comments