[comp.windows.x] Extension Bugs

ksung@m.cs.uiuc.edu (05/29/89)

I reported this problem in June 1988, and it is still there:


The documentation for Xserver extension says:
	SendErrorToClient (client, reqCode, minorCode, status, resId)

but the code in ./server/dix/extension.c says:
	SendErrorToClient (client, reqCode, minorCode, resId, status)
						       ^^^^^^^^^^^^^

and here is another problem with extensions:


The documentation for Xserver extension says:
	ExtensionEntry *AddExtension(name, NumEvents, NumErrors, MainProc, 
			      SwappedMainProc, SwapReplyProc, CloseDownProc)
					       ^^^^^^^^^^^^^

but in ./server/dix/extension.c the code looks like:
	ExtensionEntry *AddExtension(name, NumEvents, NumErrors, MainProc, 
			      SwappedMainProc, CloseDownProc)

Notice the missing SwapReplyProc argument. 
That means the XServer SwapReply Table is never set for the extension.
And none of the extension replies ever get swapped. In fact if the 
extension reply needs to be swapped, the server calls NotImplemented() 
and quits.

I am pretty sure our X source is up to date with all the reported 
bug fixes. So does this mean no one has ever written an 
extension with replies? Or do people find this bug and keep it 
to themselves?

Kelvin Sung
ksung@m.cs.uiuc.edu

rws@EXPO.LCS.MIT.EDU (05/30/89)

The documentation in doc/Server/ext.doc is incorrect.

In the case of replies, it is up to the extension to do the swapping.
The top-level ReplySwapVector is only for swapping major-code requests.
Extension requests are indexed by some minor code, and their reply swappers
cannot be stored in this table.

Extensions have been written using both of these routines.  Most extension
writers probably use the source rather than the documentation.