2 * $Id: dsi_cmdreply.c,v 1.4 2005-04-28 20:50:02 bfernhomberg Exp $
4 * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
5 * All rights reserved. See COPYRIGHT.
10 #endif /* HAVE_CONFIG_H */
13 #include <atalk/dsi.h>
14 #include <netatalk/endian.h>
16 /* this assumes that the reply follows right after the command, saving
17 * on a couple assignments. specifically, command, requestID, and
18 * reserved field are assumed to already be set. */
19 int dsi_cmdreply(DSI *dsi, const int err)
22 dsi->header.dsi_flags = DSIFL_REPLY;
23 /*dsi->header.dsi_command = DSIFUNC_CMD;*/
24 dsi->header.dsi_len = htonl(dsi->datalen);
25 dsi->header.dsi_code = htonl(err);
27 ret = dsi_stream_send(dsi, dsi->data, dsi->datalen);
28 if (dsi->sigblocked) {
29 sigprocmask(SIG_SETMASK, &dsi->oldset, NULL);