]> arthur.barton.de Git - netatalk.git/commitdiff
Dont panic
authorFrank Lahm <franklahm@googlemail.com>
Fri, 1 Apr 2011 15:38:15 +0000 (17:38 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Fri, 1 Apr 2011 15:38:15 +0000 (17:38 +0200)
libatalk/dsi/dsi_stream.c

index 5cd34a5815f67b5b8f654c41a754ed777a84f87e..680967e8be1f543b833d6ae9e6c6caf70d59f532 100644 (file)
@@ -288,6 +288,8 @@ static ssize_t buf_read(DSI *dsi, u_int8_t *buf, size_t count)
 /*
  * Essentially a loop around buf_read() to ensure "length" bytes are read
  * from dsi->buffer and/or the socket.
+ *
+ * @returns length on success, some value smaller then length indicates an error
  */
 size_t dsi_stream_read(DSI *dsi, void *data, const size_t length)
 {
@@ -310,8 +312,8 @@ size_t dsi_stream_read(DSI *dsi, void *data, const size_t length)
               if (! (dsi->flags & DSI_DISCONNECTED)) {
                   LOG(log_error, logtype_dsi, "dsi_stream_read: len:%d, %s",
                       len, (len < 0) ? strerror(errno) : "unexpected EOF");
-                  AFP_PANIC("FIXME");
               }
+              return 0;
           }
           break;
       }