From 85c69cb1897e8725d7c51d44fbed5e6198e1421e Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sun, 24 Jul 2016 17:21:10 +0200 Subject: Remove dup in dgrambug API : dgrambuf_everything_was_received(). Use dgrambuf_have_received_everything() instead. --- mcastseed/src/dgrambuf.h | 11 ++++++----- mcastseed/src/mcastleech.c | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/mcastseed/src/dgrambuf.h b/mcastseed/src/dgrambuf.h index f405757..8840669 100644 --- a/mcastseed/src/dgrambuf.h +++ b/mcastseed/src/dgrambuf.h @@ -22,13 +22,14 @@ typedef struct dgrambuf_t *dgrambuf_t; dgrambuf_t dgrambuf_new(size_t dgram_slots, size_t dgram_max_size, size_t dgram_header_size, size_t iovec_slots); -void dgrambuf_free(dgrambuf_t *dbuf); +void dgrambuf_free(dgrambuf_t *); -size_t dgrambuf_get_free_count(const dgrambuf_t); -int dgrambuf_everything_was_received(dgrambuf_t dbuf); void dgrambuf_set_validate_func(dgrambuf_t dbuf, int (*validate_func)(unsigned int, void *, unsigned int *)); -int dgrambuf_have_data_ready_to_write(dgrambuf_t dbuf); -int dgrambuf_have_received_everything(dgrambuf_t dbuf); + +size_t dgrambuf_get_free_count(const dgrambuf_t); +size_t dgrambuf_get_used_count(const dgrambuf_t); +int dgrambuf_have_data_ready_to_write(const dgrambuf_t); +int dgrambuf_have_received_everything(const dgrambuf_t); /* Warning : dgrambuf_recvmmsg sets and restore SIGALRM handler if timeout != 0 */ ssize_t dgrambuf_recvmmsg(dgrambuf_t dbuf, int sockfd, int timeout, int *info); diff --git a/mcastseed/src/mcastleech.c b/mcastseed/src/mcastleech.c index 9bba7aa..e07602d 100644 --- a/mcastseed/src/mcastleech.c +++ b/mcastseed/src/mcastleech.c @@ -236,7 +236,7 @@ int receive_data() { return res; } - if ( dgrambuf_everything_was_received(dgrambuf) ) { + if ( dgrambuf_have_received_everything(dgrambuf) ) { return 0; } return 1; -- cgit v1.2.3