From b1aa9499ffb827f4b1acc75f197e332bba382565 Mon Sep 17 00:00:00 2001 From: Roland Mainz Date: Sat, 15 May 2004 14:43:05 +0000 Subject: [PATCH] Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622 - RFE: Xprt default BIGREQUESTS extension buffer size should be 8MB (to make |XpPutDocumentData()| happy and to improve performance). --- Xprint/Init.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Xprint/Init.c b/Xprint/Init.c index ce13d6534..6c3de7550 100644 --- a/Xprint/Init.c +++ b/Xprint/Init.c @@ -308,6 +308,13 @@ void XprintInitGlobals(void) * http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=567 ("Xorg * Xprt starts to consume 100% CPU when being idle for some time")) */ defaultScreenSaverTime = 0; + + /* Ensure that the maximum request size for the BIGREQUESTS extension + * is at least 8MB (see + * http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622 - "RFE: + * Xprt's default BIGREQUESTS extension buffer size should be 8MB") + */ + maxBigRequestSize = (8*1048576)-1; } /* @@ -1317,6 +1324,15 @@ PrinterInitOutput( { FatalError("Internal screen saver must be OFF for printing."); } + + /* Print a warnung when the maximum request size of the BIGREQUESTS + * extension is smaller than 8MB (see + * http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622) + */ + if (maxBigRequestSize < (8*1048576)-1) { + ErrorF("Xp Extension: BIGREQUESTS max. request is currently %ld bytes " + ", recommemded minimum for Xprint is 8MB.\n", (long)maxBigRequestSize); + } /* * this little test is just a warning at startup to make sure