If we've already got the ScreenPtr, there's no need to retrieve it again
via the screen number, which we're getting via the ScreenPtr that we've
already got.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Use the payload size from the rpcbuf, but also compare that with our
computation as sanity check and log error on mismatch.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead doing an exrtra loop for our own calculation of the
payload size, just the wpos from rpcbuf.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
In preparation for subsequent refactoring, assembling the reply header
at once, instead of doing it piece by pice.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The payload length is already known after writing everything to the
buffer, so no need for extra size computation anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Preparation for subsequent changes: instead of returning early when no
payload to send, move that into a conditional block.
(the WriteRpcbufToClient() call on potentially empty buffer is intentional)
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
As a prepration for upcoming changes, move assembly of the the reply
header further downwards where all values are already known, so we'll
have to touch it only once. Also eliminate the separate write path for
the case where Xv is disabled.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
For easier understanding the code, declare the variables right where
they're assigned first.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Move down reply struct declaration/assignment and byte-swapping to
right before the write-out.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
* declare and assign in one shot
* move down reply struct declaration to where it's needed
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
* declare and assign them right where they're needed, in one shot
* drop unnecessary assignment and byte-swap of zero values
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The authProto field always is assigned to dynamically allocated buffer
(strdup()'ed) and needs to be freed sometimes, so cannot be const.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
some bit better naming for config symbols.
Yet leaving the old one defined, until all drivers have kept up.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
We neither need to guard including <sys/time.h> from mingw, nor do we
need that include here at all.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvListImageFormats ().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryImageAttributes().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryPortAttributes().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryBestSize().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvGetPortAttribute().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvGrabPort().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvListImageFormats().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryPortAttributes().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryAdaptors().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryEncodings().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryAdaptors().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryEncodings().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryExtension().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Instead of complex macro machinery, just move the conditional swapping
directly into ProcXvQueryExtension().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Add compile-time checks on whether sizeof(foo) == SIZEOF(foo),
using new static assert macro.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Xace callbacks are needed in many places, and the their overhead (when not
actually used) is really minimal. So it doesn't make much sense having
extra complexity for disabling it at build time.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
It's now doing exactly the same as ProcXCMiscDispatch(), so it's not
actually needed anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Move conditional swapping of request fields into main request handler,
no extra swapped handler needed anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>