From a3c4f11fb35ab5e02842155df270a3b900e498cb Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 15 Jul 2016 16:22:23 +0200 Subject: Implement libcoopgamma_set_gamma_recv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libcoopgamma.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') 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; } -- cgit v1.2.3-70-g09d2