summaryrefslogtreecommitdiff
path: root/src/irmd
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-31 20:47:23 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-31 20:47:23 +0200
commit28fe806163bfabd08dcfbe5de7bd84431453c9de (patch)
treef15f6f31b72d92085dba179a85e4f3972fc9735d /src/irmd
parent2c47c4f24b314a87e528153486eab9d5a9cd5abc (diff)
parent98d0ecf6deecf25ad48c55b2d714b2cdacdd48cb (diff)
downloadouroboros-28fe806163bfabd08dcfbe5de7bd84431453c9de.tar.gz
ouroboros-28fe806163bfabd08dcfbe5de7bd84431453c9de.zip
Merged in dstaesse/ouroboros/be-bugfixing (pull request #232)
irmd: Fix binding after registering
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);