From 18c5da3a77fd736c45730d562e35c4957269ebe3 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Thu, 21 Apr 2016 08:03:21 +0200 Subject: irmd: application registration Initial code for application registration. Specifying "*" will (for now) register with the first IPCP available in the system. Modified the echo server not to barf messages on failed accept() --- src/ipcpd/shim-udp/main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/ipcpd/shim-udp/main.c') diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c index c41d35a1..130ac17e 100644 --- a/src/ipcpd/shim-udp/main.c +++ b/src/ipcpd/shim-udp/main.c @@ -366,8 +366,6 @@ int ipcp_udp_bootstrap(struct dif_config * conf) int ipcp_udp_ap_reg(char * ap_name, uint32_t reg_ap_id) { - LOG_DBG("Registering local ap %s, %u.", ap_name, reg_ap_id); - if (_ipcp->state != IPCP_ENROLLED) { LOG_DBGF("Won't register with non-enrolled IPCP."); return -1; @@ -378,6 +376,9 @@ int ipcp_udp_ap_reg(char * ap_name, uint32_t reg_ap_id) return -1; } + LOG_DBG("Registered local ap %s, %u.", ap_name, reg_ap_id); + + /* FIXME: register application with DNS server */ LOG_MISSING; return 0; @@ -385,16 +386,11 @@ int ipcp_udp_ap_reg(char * ap_name, uint32_t reg_ap_id) int ipcp_udp_ap_unreg(uint32_t reg_ap_id) { - char * name = strdup(ipcp_data_get_reg_ap_name(_ipcp->data, - reg_ap_id)); - ipcp_data_del_reg_entry(_ipcp->data, reg_ap_id); - /* we are using dns */ + /* FIXME: unregister application from DNS server */ LOG_MISSING; - free (name); - return 0; } -- cgit v1.2.3