Imported Upstream version 2.5.1p3
[debian/amanda] / server-src / changer.c
index 0d2898cd9fd949f39c5efd78f9a087b4348eaf44..0e4c36d8ac2ff406c9f714c4ddfb32e7b27b8e15 100644 (file)
@@ -24,7 +24,7 @@
  * file named AUTHORS, in the root directory of this distribution.
  */
 /*
- * $Id: changer.c,v 1.36.2.1 2006/09/27 14:04:27 martinea Exp $
+ * $Id: changer.c,v 1.36.2.2 2007/01/25 19:47:37 martinea Exp $
  *
  * interface routines for tape changers
  */
@@ -421,7 +421,7 @@ changer_command(
        exitcode = 2;
        goto done;
     case 0:
-       if(dup2(fd[1], 1) == -1 || dup2(fd[1], 2) == -1) {
+       if(dup2(fd[1], 1) == -1 || dup2(dbfd(), 2) == -1) {
            changer_resultstr = vstralloc ("<error> ",
                                           "could not open pipe to \"",
                                           cmdstr,