Move the declaration of the reply struct down to after the payload has
been finally assembled, so we don't need extra payload size compuation
anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Use x_rpcbuf_t for reply payload assembly, instead of pre-counting and
pre-allocating buffer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Use x_rpcbuf_t for reply payload assembly, instead of pre-counting and
pre-allocating buffer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Since the x_rpcbuf already knows how much had been written, there's no
need for extra payload size computation anymore - just pick the number
of written bytes from the x_rpcbuf.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
use x_rpcbuf_t operations for constructing the reply payload, so we don't
need to do the byte-swapping explicitly anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Second step of migrating ProcVidModeGetAllModeLines() to x_rpcbuf_t:
Let it's callees also use x_rpcbuf_t operations, instead of raw pointers.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
First step of migration to x_rpcbuf: create a buffer with enough room for
the already calculated payload size and pass the raw buffer pointer to
our callees as we used to do with the calloc()ed one.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
We've been adding the individual sub-packet's payload bytes *after*
the swapping, which is leading to totally wrong sizes.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Adding helper safe_strlen() that's also checking for NULL pointer
and returning 0 in this case.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This macro is sending a reply header struct and rpcbuf payload
all in one shot. It also automatically computes the payload lengths
as well as also filling common fields like `type` and `sequenceNumber`
A typical call site looks like this:
> int ProcFooRequest(ClientPtr client) {
>
> [ ... ]
>
> X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf);
> return Success;
> }
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Add a pipeline that's checking for and notifying on merge conflicts
within open pull requests. It's triggered whenever one of the baseline
branches (eg. master, maint-*, etc) are pushed.
Unfortunately, we don't have any way for rate limiting within a single
PR yet, so on a day with lots of merges, it could become a bit spammy.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Add macro X_REPLY_HEADER_UNITS() for computing how many extra
protocol units are needed for a reply header (for .length field)
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Just a convenience wrapper for writing an INT16.
Technically it's really the same as CARD16, but we still need a typecast
in order to not getting a compiler warning on int signedness mismatch.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
New function for padding the buffer to full protocol units granularity:
If the current write position isn't at 4-byte granularity, it reserves
the remaining number of bytes (ie. writing zeros), in order to make the
next write align to 4-byte granularity again.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
take way the extra scope / indention on the `if (nbox)` statement and
use `continue` instead.
Hint: for easier review, one can use `git diff -w` in order to suppress
the indention-only changes.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>