]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2005-02-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
authorajs <ajs>
Thu, 24 Feb 2005 16:02:53 +0000 (16:02 +0000)
committerajs <ajs>
Thu, 24 Feb 2005 16:02:53 +0000 (16:02 +0000)
* stream.c: (stream_read_try) Log a warning message if a fatal
  I/O error occurs.
  (stream_fifo_new) Fix prototype.
* stream.h: Fix prototype for stream_fifo_new (need void arg).

lib/ChangeLog
lib/stream.c
lib/stream.h

index 26cb68628919df8330a0ef59ea7a85fcd03a23c1..ea561848fc74d6a7a14b06024c079ea6f75fe014 100644 (file)
@@ -1,3 +1,10 @@
+2005-02-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * stream.c: (stream_read_try) Log a warning message if a fatal
+         I/O error occurs.
+         (stream_fifo_new) Fix prototype.
+       * stream.h: Fix prototype for stream_fifo_new (need void arg).
+
 2005-02-23 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
        * {vty.h,vty.c}: Remove vty_finish (duplicate of vty_reset).
index 821ad6e5a7394e6008bc14654fed96a933b6f9fd..b71b8ee9259c1017eca66df129bdf112a2f566ac 100644 (file)
@@ -624,7 +624,10 @@ stream_read_try(struct stream *s, int fd, size_t size)
       return nbytes;
     }
   /* Error: was it transient (return -2) or fatal (return -1)? */
-  return ERRNO_IO_RETRY(errno) ? -2 : -1;
+  if (ERRNO_IO_RETRY(errno))
+    return -2;
+  zlog_warn("%s: read failed on fd %d: %s", __func__, fd, safe_strerror(errno));
+  return -1;
 }
 
 /* Read up to smaller of size or SIZE_REMAIN() bytes to the stream, starting
@@ -729,7 +732,7 @@ stream_flush (struct stream *s, int fd)
 /* Stream first in first out queue. */
 
 struct stream_fifo *
-stream_fifo_new ()
+stream_fifo_new (void)
 {
   struct stream_fifo *new;
  
index 54a167407d654f25f339f15f6b538dd9ba886ab3..1f6c3772bf426117cd1b3827deb506b287514e8e 100644 (file)
@@ -196,7 +196,7 @@ int stream_empty (struct stream *); /* is the stream empty? */
 u_char *stream_pnt (struct stream *);
 
 /* Stream fifo. */
-struct stream_fifo *stream_fifo_new ();
+struct stream_fifo *stream_fifo_new (void);
 void stream_fifo_push (struct stream_fifo *fifo, struct stream *s);
 struct stream *stream_fifo_pop (struct stream_fifo *fifo);
 struct stream *stream_fifo_head (struct stream_fifo *fifo);