diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2017-01-09 16:42:25 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2017-01-09 16:42:25 +0100 |
commit | 77c32c24b781eafd518e2cbe9de46b348a26a201 (patch) | |
tree | 817ead055668848866738e037ac3cb4c2a269bfd /src/lib/cdap.c | |
parent | f0167930862e57a2aa22520cd574f0368cb1032c (diff) | |
parent | 6c1cfb990f56b2fa87500732cb4f0966616907c7 (diff) | |
download | ouroboros-77c32c24b781eafd518e2cbe9de46b348a26a201.tar.gz ouroboros-77c32c24b781eafd518e2cbe9de46b348a26a201.zip |
Merge remote-tracking branch 'upstream/be' into be-gam
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); |