diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2010-01-13 00:32:43 +0000 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2010-02-03 01:53:43 +0100 |
commit | 29f3a2241609fd547e8e11b1c0a996ff1965a3c8 (patch) | |
tree | 688dbcbae111ce54dbdaafc87a710d81f70d8775 | |
parent | dca6c883ea6219460efbe3dadde4b8b9cb12c845 (diff) | |
download | quagga-29f3a2241609fd547e8e11b1c0a996ff1965a3c8.tar.bz2 quagga-29f3a2241609fd547e8e11b1c0a996ff1965a3c8.tar.xz |
stream: remove unused stream_read_unblock
The one place this was being used in BGP is now gone,
can remove deprecated interface.
-rw-r--r-- | lib/stream.c | 26 | ||||
-rw-r--r-- | lib/stream.h | 4 |
2 files changed, 0 insertions, 30 deletions
diff --git a/lib/stream.c b/lib/stream.c index 983330ff..bff74d7b 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -711,32 +711,6 @@ stream_read (struct stream *s, int fd, size_t size) return nbytes; } -/* Read size from fd. */ -int -stream_read_unblock (struct stream *s, int fd, size_t size) -{ - int nbytes; - int val; - - STREAM_VERIFY_SANE(s); - - if (STREAM_WRITEABLE (s) < size) - { - STREAM_BOUND_WARN (s, "put"); - return 0; - } - - val = fcntl (fd, F_GETFL, 0); - fcntl (fd, F_SETFL, val|O_NONBLOCK); - nbytes = read (fd, s->data + s->endp, size); - fcntl (fd, F_SETFL, val); - - if (nbytes > 0) - s->endp += nbytes; - - return nbytes; -} - ssize_t stream_read_try(struct stream *s, int fd, size_t size) { diff --git a/lib/stream.h b/lib/stream.h index 3e4ba7b4..486a3f93 100644 --- a/lib/stream.h +++ b/lib/stream.h @@ -181,10 +181,6 @@ extern u_int32_t stream_get_ipv4 (struct stream *); Use stream_read_try instead. */ extern int stream_read (struct stream *, int, size_t); -/* Deprecated: all file descriptors should already be non-blocking. - Will be removed. Use stream_read_try instead. */ -extern int stream_read_unblock (struct stream *, int, size_t); - /* Read up to size bytes into the stream. Return code: >0: number of bytes read |