From 84970a8d9286637ab00f2a4bd692d3ccbff4960e Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Sat, 23 Nov 2024 14:39:16 +0000 Subject: [PATCH] xup: Display mismatched version number to user The mismatched versions are now displayed to the user rathe than being buried in the log. This should aid fault reporting and help users find distro-introduced problems with an Internet search. --- xup/xup.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xup/xup.c b/xup/xup.c index 6860f594..cfe65f8d 100644 --- a/xup/xup.c +++ b/xup/xup.c @@ -1836,12 +1836,12 @@ lib_mod_process_message(struct mod *mod, struct stream *s) in_uint32_le(s, version); if (version != CLIENT_INFO_CURRENT_VERSION) { - LOG(LOG_LEVEL_ERROR, - "Xorg module has version %d, expected %d", - version, CLIENT_INFO_CURRENT_VERSION); - mod->server_msg(mod, - "Xorg module has wrong version number", - 0); + char msg[128]; + g_snprintf(msg, sizeof(msg), + "Xorg module has version %d, expected %d", + version, CLIENT_INFO_CURRENT_VERSION); + LOG(LOG_LEVEL_ERROR, "%s", msg); + mod->server_msg(mod, msg, 0); mod->caps_processing_status = E_CAPS_NOT_OK; } break;