summaryrefslogtreecommitdiff
path: root/src/irmd
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-08-31 16:11:45 +0200
committerdimitri staessens <[email protected]>2016-08-31 20:38:57 +0200
commit115d2d5552fc4acd0f17bea7c0ec6c8a7042ae4a (patch)
treec94d73bd1bcb92ce9a6e1ab978ce671d9c171b24 /src/irmd
parentc1f31f6c3ca8bd91d0caaa209e2a1592eebf77d5 (diff)
downloadouroboros-115d2d5552fc4acd0f17bea7c0ec6c8a7042ae4a.tar.gz
ouroboros-115d2d5552fc4acd0f17bea7c0ec6c8a7042ae4a.zip
irmd: Fix binding after registering
Flow will now allocate correctly when the name is registered in a DIF before it is bound to an AP.
Diffstat (limited to 'src/irmd')
-rw-r--r--src/irmd/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c
index 29f6d9d0..465415b8 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -482,6 +482,7 @@ static int bind_ap(char * ap,
int i;
char * name_dup = NULL;
struct apn_entry * e = NULL;
+ struct reg_entry * re = NULL;
if (ap == NULL || name == NULL)
return -EINVAL;
@@ -561,6 +562,10 @@ static int bind_ap(char * ap,
return -ENOMEM;
}
+ re = registry_get_entry(&irmd->registry, name);
+ if (re != NULL && reg_entry_add_apn(re, e) < 0)
+ LOG_ERR("Failed adding AP %s for name %s.", ap, name);
+
pthread_rwlock_unlock(&irmd->reg_lock);
pthread_rwlock_unlock(&irmd->state_lock);