From a94e906084163f186464509c1d866baca024cb22 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 23 May 2025 12:09:37 +0200 Subject: [PATCH] dix: unexport SendErrorToClient() and fix parameter types * not used by any drivers, so no need to keep it exported * fix parameter types to matching the protocol types Signed-off-by: Enrico Weigelt, metux IT consult --- dix/dispatch.c | 4 ++-- dix/dix_priv.h | 16 ++++++++++++++++ include/dix.h | 6 ------ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 2f07a1f50..da2d01f0c 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3820,8 +3820,8 @@ ProcEstablishConnection(ClientPtr client) } void -SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode, - XID resId, int errorCode) +SendErrorToClient(ClientPtr client, CARD8 majorCode, CARD16 minorCode, + XID resId, BYTE errorCode) { xError rep = { .type = X_Error, diff --git a/dix/dix_priv.h b/dix/dix_priv.h index 80739e8ce..d77cd267e 100644 --- a/dix/dix_priv.h +++ b/dix/dix_priv.h @@ -374,4 +374,20 @@ void ClientWakeup(ClientPtr pclient) Bool ClientIsAsleep(ClientPtr pClient) _X_ATTRIBUTE_NONNULL_ARG(1); +/* + * @brief send error packet (xError) to client + * + * @param pClient pointer to client structure + * @param majorCode major opcode of failed request + * @param minorCode minor opcode of failed request + * @param resId ID of resource the failure occured on + * @param errorCode error code value + */ +void SendErrorToClient(ClientPtr pClient, + CARD8 majorCode, + CARD16 minorCode, + XID resId, + BYTE errorCode) + _X_ATTRIBUTE_NONNULL_ARG(1); + #endif /* _XSERVER_DIX_PRIV_H */ diff --git a/include/dix.h b/include/dix.h index 091b05901..51b126094 100644 --- a/include/dix.h +++ b/include/dix.h @@ -162,12 +162,6 @@ extern _X_EXPORT void UpdateCurrentTimeIf(void); */ _X_EXPORT int dixDestroyPixmap(void *pPixmap, XID unused); -extern _X_EXPORT void SendErrorToClient(ClientPtr /*client */ , - unsigned int /*majorCode */ , - unsigned int /*minorCode */ , - XID /*resId */ , - int /*errorCode */ ); - /* dixutils.c */ extern _X_EXPORT int dixLookupWindow(WindowPtr *result,