diff options
author | Mattias Andrée <maandree@kth.se> | 2016-07-15 16:22:23 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-07-15 16:22:23 +0200 |
commit | a3c4f11fb35ab5e02842155df270a3b900e498cb (patch) | |
tree | f6680a6eb391a611bf412a8998b32ef130060720 /src/libcoopgamma.c | |
parent | Implement libcoopgamma_get_gamma_recv (diff) | |
download | libcoopgamma-a3c4f11fb35ab5e02842155df270a3b900e498cb.tar.gz libcoopgamma-a3c4f11fb35ab5e02842155df270a3b900e498cb.tar.bz2 libcoopgamma-a3c4f11fb35ab5e02842155df270a3b900e498cb.tar.xz |
Implement libcoopgamma_set_gamma_recv
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/libcoopgamma.c')
-rw-r--r-- | src/libcoopgamma.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libcoopgamma.c b/src/libcoopgamma.c index 74e085c..3b2f08e 100644 --- a/src/libcoopgamma.c +++ b/src/libcoopgamma.c @@ -1932,5 +1932,16 @@ int libcoopgamma_set_gamma_send(libcoopgamma_filter_t* restrict filter, libcoopg int libcoopgamma_set_gamma_recv(libcoopgamma_context_t* restrict ctx, libcoopgamma_async_context_t* restrict async) { + size_t _n = 0; + + if (check_error(ctx, async)) + return -(ctx->error.custom || ctx->error.number); + + while (*next_line(ctx)); + (void) next_payload(ctx, &_n); + + errno = EBADMSG; + copy_errno(ctx); + return -1; } |