X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libatalk%2Fdsi%2Fdsi_read.c;h=31ee3bdff4a9191327b808061c6979c8ae4a0dcf;hb=e450b7b95579a4a4358e499fdbf93620aa09bae2;hp=12971511022f00835b61b922871b36bb75fa5789;hpb=5fd60bee90f24cd522d4cf3cd9335e4c8dce3d58;p=netatalk.git diff --git a/libatalk/dsi/dsi_read.c b/libatalk/dsi/dsi_read.c index 12971511..31ee3bdf 100644 --- a/libatalk/dsi/dsi_read.c +++ b/libatalk/dsi/dsi_read.c @@ -1,6 +1,4 @@ /* - * $Id: dsi_read.c,v 1.7 2009-10-25 06:13:11 didg Exp $ - * * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) * All rights reserved. See COPYRIGHT. */ @@ -11,15 +9,10 @@ #include #include -#ifdef HAVE_UNISTD_H #include -#endif /* HAVE_UNISTD_H */ #include #include #include -#ifdef HAVE_SYS_FILIO_H -#include -#endif #include #include @@ -30,8 +23,7 @@ * it will send off the header plus whatever is in its command * buffer. it returns the amount of stuff still to be read * (constrained by the buffer size). */ -ssize_t dsi_readinit(DSI *dsi, void *buf, const size_t buflen, - const size_t size, const int err) +ssize_t dsi_readinit(DSI *dsi, void *buf, const size_t buflen, const size_t size, const int err) { LOG(log_maxdebug, logtype_dsi, "dsi_readinit: sending %zd bytes from buffer, total size: %zd", buflen, size); @@ -39,7 +31,7 @@ ssize_t dsi_readinit(DSI *dsi, void *buf, const size_t buflen, dsi->flags |= DSI_NOREPLY; /* we will handle our own replies */ dsi->header.dsi_flags = DSIFL_REPLY; dsi->header.dsi_len = htonl(size); - dsi->header.dsi_code = htonl(err); + dsi->header.dsi_data.dsi_code = htonl(err); dsi->in_write++; if (dsi_stream_send(dsi, buf, buflen)) {