dix: be more verbose when we run out of opcodes
If we run out of opcodes, nothing is print on the log, making the problem hard to debug. In the current Xserver, if you enable some extensions like multibuffer (+2 events) and use nvidia binary driver (+5 events) you can run out of opcode numbers. Signed-off-by: Paulo Ricardo Zanoni <pzanoni@mandriva.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
6150595bdb
commit
a9fe7cfa77
|
@ -83,8 +83,11 @@ AddExtension(char *name, int NumEvents, int NumErrors,
|
|||
if (!MainProc || !SwappedMainProc || !MinorOpcodeProc)
|
||||
return((ExtensionEntry *) NULL);
|
||||
if ((lastEvent + NumEvents > LAST_EVENT) ||
|
||||
(unsigned)(lastError + NumErrors > LAST_ERROR))
|
||||
(unsigned)(lastError + NumErrors > LAST_ERROR)) {
|
||||
LogMessage(X_ERROR, "Not enabling extension %s: maximum number of "
|
||||
"events or errors exceeded.\n", name);
|
||||
return((ExtensionEntry *) NULL);
|
||||
}
|
||||
|
||||
ext = xalloc(sizeof(ExtensionEntry));
|
||||
if (!ext)
|
||||
|
|
Loading…
Reference in New Issue
Block a user