]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/dsi/dsi_cmdreply.c
Fix unnamed union inside struct
[netatalk.git] / libatalk / dsi / dsi_cmdreply.c
index 4d5a904d199003b8930f6b87e93641ee6907a13d..04d17083351ea715cf89809c0cd3eb8189d4fef7 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id: dsi_cmdreply.c,v 1.5 2009-10-25 06:13:11 didg Exp $
- *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
  */
 #include <arpa/inet.h>
 
 #include <atalk/dsi.h>
+#include <atalk/logger.h>
 
 /* this assumes that the reply follows right after the command, saving
  * on a couple assignments. specifically, command, requestID, and
  * reserved field are assumed to already be set. */ 
 int dsi_cmdreply(DSI *dsi, const int err)
 {
-int ret;
-  dsi->header.dsi_flags = DSIFL_REPLY;
-  /*dsi->header.dsi_command = DSIFUNC_CMD;*/
-  dsi->header.dsi_len = htonl(dsi->datalen);
-  dsi->header.dsi_code = htonl(err);
-
-  ret = dsi_stream_send(dsi, dsi->data, dsi->datalen);
-  return ret;
+    int ret;
+
+    LOG(log_debug, logtype_dsi, "dsi_cmdreply(DSI ID: %u, len: %zd): START",
+        dsi->clientID, dsi->datalen);
+
+    dsi->header.dsi_flags = DSIFL_REPLY;
+    dsi->header.dsi_len = htonl(dsi->datalen);
+    dsi->header.dsi_data.dsi_code = htonl(err);
+
+    ret = dsi_stream_send(dsi, dsi->data, dsi->datalen);
+
+    LOG(log_debug, logtype_dsi, "dsi_cmdreply(DSI ID: %u, len: %zd): END",
+        dsi->clientID, dsi->datalen);
+
+    return ret;
 }