]> git.puffer.fish Git - matthieu/frr.git/commitdiff
stream: remove unused stream_read_unblock
authorStephen Hemminger <shemminger@vyatta.com>
Wed, 13 Jan 2010 00:32:43 +0000 (00:32 +0000)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Thu, 26 May 2016 01:15:03 +0000 (01:15 +0000)
The one place this was being used in BGP is now gone,
can remove deprecated interface.
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit 3790eb0d3f0bbb24b9c6be97f547cec144ee05d1)

lib/stream.c
lib/stream.h

index 11f35d884ef0228a65d0b1465cd6292ec2195930..b0838e7934567c59e2bdb22c8cf1626c6ff2d578 100644 (file)
@@ -817,32 +817,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)
 {
index 32d2668310c9349d61e93840558d32046621f068..738034438ca856de1f65d005e8ada3322f5b41aa 100644 (file)
@@ -199,10 +199,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