summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/ribmgr.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2017-01-09 16:40:40 +0100
committerSander Vrijders <sander.vrijders@intec.ugent.be>2017-01-09 16:40:40 +0100
commit6c1cfb990f56b2fa87500732cb4f0966616907c7 (patch)
tree4af3a0e2ce9fc12d7dc759803da70b7f570d6f8a /src/ipcpd/normal/ribmgr.c
parente56d24010287127fc6b9c9da8d1f7cf160c50253 (diff)
parent5273b0f5915956e49bcad4167cca2c1349e8816d (diff)
downloadouroboros-6c1cfb990f56b2fa87500732cb4f0966616907c7.tar.gz
ouroboros-6c1cfb990f56b2fa87500732cb4f0966616907c7.zip
Merged in dstaesse/ouroboros/be-list (pull request #340)
Updates to list and fixes LGPL license for library
Diffstat (limited to 'src/ipcpd/normal/ribmgr.c')
-rw-r--r--src/ipcpd/normal/ribmgr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ipcpd/normal/ribmgr.c b/src/ipcpd/normal/ribmgr.c
index e52db08a..6356d48c 100644
--- a/src/ipcpd/normal/ribmgr.c
+++ b/src/ipcpd/normal/ribmgr.c
@@ -471,9 +471,9 @@ static int write_ro_msg(struct cdap * neighbor,
int ribmgr_init()
{
- INIT_LIST_HEAD(&rib.flows);
- INIT_LIST_HEAD(&rib.subs);
- INIT_LIST_HEAD(&rib.ro_ids);
+ list_head_init(&rib.flows);
+ list_head_init(&rib.subs);
+ list_head_init(&rib.ro_ids);
rib.root = malloc(sizeof(*(rib.root)));
if (rib.root == NULL)
@@ -993,7 +993,7 @@ static int ro_id_create(char * name, ro_msg_t * msg)
tmp->seqno = msg->seqno;
tmp->full_name = strdup(name);
- INIT_LIST_HEAD(&tmp->next);
+ list_head_init(&tmp->next);
if (tmp->full_name == NULL) {
free(tmp);
@@ -1154,7 +1154,7 @@ static int ribmgr_add_flow(int fd)
return -1;
}
- INIT_LIST_HEAD(&flow->next);
+ list_head_init(&flow->next);
flow->instance = instance;
flow->fd = fd;
@@ -1310,7 +1310,7 @@ int ribmgr_enrol()
pthread_rwlock_wrlock(&rib.flows_lock);
- assert(!list_empty(&rib.flows));
+ assert(!list_is_empty(&rib.flows));
flow = list_first_entry((&rib.flows), struct mgmt_flow, next);
instance = flow->instance;
@@ -1631,7 +1631,7 @@ int ro_subscribe(const char * name, struct ro_sub_ops * ops)
if (sub == NULL)
return -ENOMEM;
- INIT_LIST_HEAD(&sub->next);
+ list_head_init(&sub->next);
sub->name = strdup(name);
if (sub->name == NULL) {