]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/dsi/dsi_read.c
Fix unnamed union inside struct
[netatalk.git] / libatalk / dsi / dsi_read.c
index 75dfe9579d1c0923c3818a0b42255386f3e5fdd7..31ee3bdff4a9191327b808061c6979c8ae4a0dcf 100644 (file)
@@ -23,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);
@@ -32,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)) {