summaryrefslogtreecommitdiff
path: root/src/lib/cdap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/cdap.c')
-rw-r--r--src/lib/cdap.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/lib/cdap.c b/src/lib/cdap.c
index 17104770..956486d1 100644
--- a/src/lib/cdap.c
+++ b/src/lib/cdap.c
@@ -1,22 +1,23 @@
/*
- * Ouroboros - Copyright (C) 2016
+ * Ouroboros - Copyright (C) 2016 - 2017
*
* The Common Distributed Application Protocol
*
* Sander Vrijders <sander.vrijders@intec.ugent.be>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
*/
#include <ouroboros/config.h>
@@ -365,8 +366,8 @@ struct cdap * cdap_create(int fd)
return NULL;
}
- INIT_LIST_HEAD(&instance->sent);
- INIT_LIST_HEAD(&instance->rcvd);
+ list_head_init(&instance->sent);
+ list_head_init(&instance->rcvd);
instance->fd = fd;
@@ -573,7 +574,7 @@ cdap_key_t cdap_request_wait(struct cdap * instance,
pthread_cleanup_push((void(*)(void *))pthread_mutex_unlock,
(void *) &instance->rcvd_lock);
- while (list_empty(&instance->rcvd))
+ while (list_is_empty(&instance->rcvd))
pthread_cond_wait(&instance->rcvd_cond, &instance->rcvd_lock);
rcvd = list_first_entry(&instance->rcvd, struct cdap_rcvd, next);