diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2017-01-09 16:40:40 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2017-01-09 16:40:40 +0100 |
commit | 6c1cfb990f56b2fa87500732cb4f0966616907c7 (patch) | |
tree | 4af3a0e2ce9fc12d7dc759803da70b7f570d6f8a /src/lib/cdap.c | |
parent | e56d24010287127fc6b9c9da8d1f7cf160c50253 (diff) | |
parent | 5273b0f5915956e49bcad4167cca2c1349e8816d (diff) | |
download | ouroboros-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/lib/cdap.c')
-rw-r--r-- | src/lib/cdap.c | 27 |
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); |