diff options
| author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-08-29 10:50:43 +0200 | 
|---|---|---|
| committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-08-29 10:50:43 +0200 | 
| commit | caeefb4d96331d24b38e845c99d0517913a71671 (patch) | |
| tree | a9dbfceba99190181f0d427fb98bb964031d9548 /src/lib | |
| parent | da0739d8dea1235a047095c08cfe67871c3c216e (diff) | |
| parent | bb2e24baf3f05c03450defd4c22a8a1279698bb1 (diff) | |
| download | ouroboros-caeefb4d96331d24b38e845c99d0517913a71671.tar.gz ouroboros-caeefb4d96331d24b38e845c99d0517913a71671.zip | |
Merged in dstaesse/ouroboros/be-bugfixing (pull request #228)
Some fixes
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/cdap.c | 11 | 
1 files changed, 4 insertions, 7 deletions
| diff --git a/src/lib/cdap.c b/src/lib/cdap.c index 5dc050a4..8b1b3bc6 100644 --- a/src/lib/cdap.c +++ b/src/lib/cdap.c @@ -107,7 +107,7 @@ static void * handle_cdap_msg(void * o)          case OPCODE__DELETE:                  if (msg->name != NULL &&                      msg->has_value) -                        instance->ops->cdap_create(instance, +                        instance->ops->cdap_delete(instance,                                                     msg->invoke_id,                                                     msg->name,                                                     msg->value.data, @@ -230,12 +230,10 @@ struct cdap * cdap_create(struct cdap_ops * ops,  int cdap_destroy(struct cdap * instance)  {          if (instance == NULL) -                return -1; +                return 0;          pthread_cancel(instance->reader); - -        if (flow_dealloc(instance->fd)) -                return -1; +        pthread_join(instance->reader, NULL);          pthread_mutex_lock(&instance->ids_lock); @@ -243,8 +241,7 @@ int cdap_destroy(struct cdap * instance)          pthread_mutex_unlock(&instance->ids_lock); -        pthread_join(instance->reader, -                     NULL); +        flow_dealloc(instance->fd);          free(instance); | 
