summaryrefslogtreecommitdiff
path: root/src/irmd/registry.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2017-01-09 16:42:25 +0100
committerSander Vrijders <sander.vrijders@intec.ugent.be>2017-01-09 16:42:25 +0100
commit77c32c24b781eafd518e2cbe9de46b348a26a201 (patch)
tree817ead055668848866738e037ac3cb4c2a269bfd /src/irmd/registry.c
parentf0167930862e57a2aa22520cd574f0368cb1032c (diff)
parent6c1cfb990f56b2fa87500732cb4f0966616907c7 (diff)
downloadouroboros-77c32c24b781eafd518e2cbe9de46b348a26a201.tar.gz
ouroboros-77c32c24b781eafd518e2cbe9de46b348a26a201.zip
Merge remote-tracking branch 'upstream/be' into be-gam
Diffstat (limited to 'src/irmd/registry.c')
-rw-r--r--src/irmd/registry.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/irmd/registry.c b/src/irmd/registry.c
index 34d0a921..35c17069 100644
--- a/src/irmd/registry.c
+++ b/src/irmd/registry.c
@@ -1,5 +1,5 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* The IPC Resource Manager - Registry
*
@@ -63,10 +63,10 @@ static struct reg_entry * reg_entry_init(struct reg_entry * e,
if (e == NULL || name == NULL)
return NULL;
- INIT_LIST_HEAD(&e->next);
- INIT_LIST_HEAD(&e->difs);
- INIT_LIST_HEAD(&e->reg_apns);
- INIT_LIST_HEAD(&e->reg_apis);
+ list_head_init(&e->next);
+ list_head_init(&e->difs);
+ list_head_init(&e->reg_apns);
+ list_head_init(&e->reg_apis);
e->name = name;
@@ -228,7 +228,7 @@ void reg_entry_del_apn(struct reg_entry * e, char * apn)
}
}
- if (e->state == REG_NAME_AUTO_ACCEPT && list_empty(&e->reg_apns)) {
+ if (e->state == REG_NAME_AUTO_ACCEPT && list_is_empty(&e->reg_apns)) {
e->state = REG_NAME_IDLE;
pthread_cond_broadcast(&e->state_cond);
}
@@ -237,7 +237,7 @@ void reg_entry_del_apn(struct reg_entry * e, char * apn)
char * reg_entry_get_apn(struct reg_entry * e)
{
- if (!list_empty(&e->reg_apis) || list_empty(&e->reg_apns))
+ if (!list_is_empty(&e->reg_apis) || list_is_empty(&e->reg_apns))
return NULL;
return list_first_entry(&e->reg_apns, struct str_el, next)->str;
@@ -311,8 +311,8 @@ void reg_entry_del_api(struct reg_entry * e, pid_t api)
}
}
- if (list_empty(&e->reg_apis)) {
- if (!list_empty(&e->reg_apns))
+ if (list_is_empty(&e->reg_apis)) {
+ if (!list_is_empty(&e->reg_apns))
e->state = REG_NAME_AUTO_ACCEPT;
else
e->state = REG_NAME_IDLE;
@@ -328,7 +328,7 @@ pid_t reg_entry_get_api(struct reg_entry * e)
if (e == NULL)
return -1;
- if (list_empty(&e->reg_apis))
+ if (list_is_empty(&e->reg_apis))
return -1;
return list_first_entry(&e->reg_apis, struct pid_el, next)->pid;