diff options
| author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-07-28 11:53:15 +0200 | 
|---|---|---|
| committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-07-28 11:53:15 +0200 | 
| commit | 67de2ae5f7aee25c077096bd90a8d4cd3cdcf094 (patch) | |
| tree | 88d94943823a7d44b2be9d13ba267cf04c995fe9 /src/irmd | |
| parent | 351a48acbe1295e7a446951b7ae7c461d42b8bbb (diff) | |
| parent | f2e87e236ad89b4a3fc4dda59ed42ab9af04d08c (diff) | |
| download | ouroboros-67de2ae5f7aee25c077096bd90a8d4cd3cdcf094.tar.gz ouroboros-67de2ae5f7aee25c077096bd90a8d4cd3cdcf094.zip | |
Merged in dstaesse/ouroboros/be-irmd-res (pull request #179)
irmd: Fix allocation result
Diffstat (limited to 'src/irmd')
| -rw-r--r-- | src/irmd/main.c | 16 | 
1 files changed, 6 insertions, 10 deletions
| diff --git a/src/irmd/main.c b/src/irmd/main.c index d7119bac..b071ff1c 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -998,17 +998,13 @@ static int flow_alloc_res(int port_id)                  return 0;          } -        if (e->state == FLOW_DESTROY) { -                /* don't release the port_id, AP has to call dealloc */ -                e->state = FLOW_NULL; -                pthread_cond_signal(&e->state_cond); -                pthread_mutex_unlock(&e->state_lock); -                pthread_rwlock_unlock(&irmd->flows_lock); -                pthread_rwlock_unlock(&irmd->state_lock); -                return -1; -        } +        e->state = FLOW_NULL; +        pthread_cond_signal(&e->state_cond); +        pthread_mutex_unlock(&e->state_lock); +        pthread_rwlock_unlock(&irmd->flows_lock); +        pthread_rwlock_unlock(&irmd->state_lock); -        return 0; +        return -1;  }  static int flow_dealloc(int port_id) | 
