diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-06-25 16:07:00 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-06-25 16:07:00 +0000 |
commit | 62822b184887d858fb2f877b16b2ef3291b991c1 (patch) | |
tree | 26d8d049f73fa7b47c58c21aa20fd46a223a2d81 /buffer-poll.c | |
parent | abb5e3619940be874fcce77d9bc00ed49a8c3e68 (diff) | |
download | rtmux-62822b184887d858fb2f877b16b2ef3291b991c1.tar.gz rtmux-62822b184887d858fb2f877b16b2ef3291b991c1.tar.bz2 rtmux-62822b184887d858fb2f877b16b2ef3291b991c1.zip |
Nuke unused buffer functions. Found by lint.
Also remove some old debug output which was #if 0.
Diffstat (limited to 'buffer-poll.c')
-rw-r--r-- | buffer-poll.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/buffer-poll.c b/buffer-poll.c index 40c1984b..b3e4a8de 100644 --- a/buffer-poll.c +++ b/buffer-poll.c @@ -1,4 +1,4 @@ -/* $Id: buffer-poll.c,v 1.11 2009-05-13 23:27:00 nicm Exp $ */ +/* $OpenBSD: buffer-poll.c,v 1.2 2009/06/25 06:05:47 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -66,9 +66,6 @@ buffer_poll(struct pollfd *pfd, struct buffer *in, struct buffer *out) } if (BUFFER_USED(out) > 0 && pfd->revents & POLLOUT) { n = write(pfd->fd, BUFFER_OUT(out), BUFFER_USED(out)); -#if 0 - log_debug("buffer_poll: fd=%d, write=%zd", pfd->fd, n); -#endif if (n == -1) { if (errno != EINTR && errno != EAGAIN) return (-1); @@ -77,23 +74,3 @@ buffer_poll(struct pollfd *pfd, struct buffer *in, struct buffer *out) } return (0); } - -/* Flush buffer output to socket. */ -void -buffer_flush(int fd, struct buffer *in, struct buffer *out) -{ - struct pollfd pfd; - - while (BUFFER_USED(out) > 0) { - buffer_set(&pfd, fd, in, out); - - if (poll(&pfd, 1, INFTIM) == -1) { - if (errno == EAGAIN || errno == EINTR) - continue; - fatal("poll failed"); - } - - if (buffer_poll(&pfd, in, out) != 0) - break; - } -} |