From 3fc1cd9ec6d8473b40461da79176fe3ec41f47fa Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 12 Jul 2016 15:44:04 +0200 Subject: lib: Remove N-1 DIF param from enroll operation This removes the parameter N-1 DIF from the enroll operation. IPCPs should just allocate a flow to a DIF name and let the N-1 DIF resolve it. --- src/irmd/main.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/irmd') diff --git a/src/irmd/main.c b/src/irmd/main.c index 30ecbc59..17e51c05 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -422,8 +422,6 @@ static int bootstrap_ipcp(pid_t api, static int enroll_ipcp(pid_t api, char * dif_name) { - char ** n_1_difs = NULL; - ssize_t n_1_difs_size = 0; struct ipcp_entry * entry = NULL; pthread_rwlock_rdlock(&instance->state_lock); @@ -451,17 +449,7 @@ static int enroll_ipcp(pid_t api, return -1; } - n_1_difs_size = nsm_resolve(dif_name, n_1_difs); - if (n_1_difs_size < 1) { - free(entry->dif_name); - entry->dif_name = NULL; - pthread_rwlock_unlock(&instance->reg_lock); - pthread_rwlock_unlock(&instance->state_lock); - LOG_ERR("Could not find N-1 DIFs."); - return -1; - } - - if (ipcp_enroll(api, dif_name, n_1_difs[0])) { + if (ipcp_enroll(api, dif_name)) { free(entry->dif_name); entry->dif_name = NULL; pthread_rwlock_unlock(&instance->reg_lock); -- cgit v1.2.3