vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Tue May 24 22:50:38 2016 +0300| [d3cc365393e0b191b1a6e64ef36b77cf9c22f0d9] | committer: Rémi Denis-Courmont
http: fix h2output test > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d3cc365393e0b191b1a6e64ef36b77cf9c22f0d9 --- modules/access/http/h2output_test.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/access/http/h2output_test.c b/modules/access/http/h2output_test.c index fedbb7a..18afa3c 100644 --- a/modules/access/http/h2output_test.c +++ b/modules/access/http/h2output_test.c @@ -28,6 +28,7 @@ #include <stdarg.h> #include <stdint.h> #include <stdlib.h> +#include <errno.h> #include <vlc_common.h> #include <vlc_tls.h> #include "h2frame.h" @@ -43,7 +44,7 @@ static vlc_sem_t rx; static int fd_callback(vlc_tls_t *tls) { (void) tls; - return -1; + return fileno(stderr); /* should be writable (at least most of the time) */ } static ssize_t send_callback(vlc_tls_t *tls, const struct iovec *iov, @@ -73,8 +74,12 @@ static ssize_t send_callback(vlc_tls_t *tls, const struct iovec *iov, assert(len == 9 + 1); assert(p[9] == counter); - counter++; + if (send_failure) + errno = EIO; + else + counter++; vlc_sem_post(&rx); + return send_failure ? -1 : (ssize_t)len; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
