summaryrefslogtreecommitdiff
path: root/Xprint
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nrubsig.org>2004-05-15 14:43:05 +0000
committerRoland Mainz <roland.mainz@nrubsig.org>2004-05-15 14:43:05 +0000
commitb1aa9499ffb827f4b1acc75f197e332bba382565 (patch)
treea5cf0921be167fbbbc7d04fa1ac86c87483e7838 /Xprint
parent74b2a7694791297a4f798ecc05c7eb8f68634722 (diff)
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).
Diffstat (limited to 'Xprint')
-rw-r--r--Xprint/Init.c16
1 files changed, 16 insertions, 0 deletions
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