From af389692c0a687675c74fd432e3a2309337ad3c9 Mon Sep 17 00:00:00 2001 From: "Enrico Loparco (eloparco)" Date: Thu, 24 Jun 2021 17:04:19 +0200 Subject: [HICN-712] Fix listener table retrieval Signed-off-by: Enrico Loparco (eloparco) Change-Id: I8cd7c37a570011c2215255fab5e020291dfd0ef7 --- hicn-light/src/hicn/core/listener.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'hicn-light/src/hicn/core/listener.c') diff --git a/hicn-light/src/hicn/core/listener.c b/hicn-light/src/hicn/core/listener.c index 7c3ba5235..01f62bb39 100644 --- a/hicn-light/src/hicn/core/listener.c +++ b/hicn-light/src/hicn/core/listener.c @@ -39,7 +39,10 @@ listener_create(face_type_t type, const address_t * address, .type = type, .address = *address, }; - listener_table_allocate(table, listener, &key, name); + listener_table_allocate(table, listener, &key, strdup(name)); + WITH_DEBUG( + listener_table_print(table); + ) unsigned listener_id = listener_table_get_listener_id(table, listener); @@ -376,13 +379,6 @@ listener_setup_all(const forwarder_t * forwarder, uint16_t port, const char *loc void listener_setup_local_ipv4(forwarder_t * forwarder, uint16_t port) { -#if 0 - // XXX memset - address_t address = ADDRESS4_LOCALHOST(port); - - _setupUdpListener(forwarder, "lo_udp", &address, "lo"); - _setupTcpListener(forwarder, "lo_tcp", &address, "lo"); -#endif address_t address; memset(&address, 0, sizeof(address_t)); address = ADDRESS4_LOCALHOST(port); -- cgit 1.2.3-korg