Fix bug #5479, print spool shares require max_xmit to
authorJeremy Allison <jra@samba.org>
Wed, 21 May 2008 19:39:08 +0000 (12:39 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 21 May 2008 19:39:27 +0000 (12:39 -0700)
be adhered to.
Jeremy.

source/libsmb/clireadwrite.c

index 12ba4b737fbe56fb5d76c555a63594fbcb3c6a6f..515471e0030ddaa3f660133714ec61d9859da50c 100644 (file)
@@ -704,7 +704,12 @@ ssize_t cli_write(struct cli_state *cli,
                /* Only do massive writes if we can do them direct
                 * with no signing or encrypting - not on a pipe. */
                writesize = CLI_SAMBA_MAX_POSIX_LARGE_WRITEX_SIZE;
-       } else if (cli->capabilities & CAP_LARGE_WRITEX) {
+       } else if ((cli->capabilities & CAP_LARGE_WRITEX) &&
+                       (strcmp(cli->dev, "LPT1:") != 0)) {
+
+               /* Printer devices are restricted to max_xmit
+                * writesize in Vista and XPSP3. */
+
                if (cli->is_samba) {
                        writesize = CLI_SAMBA_MAX_LARGE_WRITEX_SIZE;
                } else if (!client_is_signing_on(cli)) {