]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/dsi/dsi_cmdreply.c
- merge branch-netatalk-afp-3x-dev, HEAD was tagged before
[netatalk.git] / libatalk / dsi / dsi_cmdreply.c
index fbd084a7e98aebabda20a265e0d3a0ca3a7c1144..f2223fff8f7400795ff27f92501f9ad21c711448 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dsi_cmdreply.c,v 1.3 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: dsi_cmdreply.c,v 1.4 2005-04-28 20:50:02 bfernhomberg Exp $
  *
  * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
  * 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);
 
-  return dsi_stream_send(dsi, dsi->data, dsi->datalen);
+  ret = dsi_stream_send(dsi, dsi->data, dsi->datalen);
+  if (dsi->sigblocked)  {
+      sigprocmask(SIG_SETMASK, &dsi->oldset, NULL);
+      dsi->sigblocked = 0;
+  }
+  return ret;
 }