From 8e8bf9ec33f796be6f770181e41453b57a549602 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Wed, 27 May 2026 21:03:53 +0200 Subject: [PATCH] nwbind: report mars-nwe version as server description Replace the old hard-coded server description date with a Mars NWE version string built from the existing _VERS_H_, _VERS_L_ and _VERS_P_ build macros. WHOAMI and similar clients display this value in the line: Server is running . Instead of reporting the legacy fixed value "14-Jun-03", the server now reports a stable release-style description such as: mars-nwe-0.99.pl28 Also advance the response buffer after writing the revision string so the description field does not overwrite the previous field. --- src/nwbind.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/nwbind.c b/src/nwbind.c index c08e90e..5bc5460 100644 --- a/src/nwbind.c +++ b/src/nwbind.c @@ -1,7 +1,5 @@ /* nwbind.c */ -#define REVISION_DATE "14-Jun-03" // (M@K) - /* NCP Bindery SUB-SERVER */ /* authentification and some message and queue handling */ @@ -1752,15 +1750,21 @@ static void handle_fxx(int gelen, int func) case 0xc9 : { /* GET FILE SERVER DESCRIPTION STRINGs */ char *company = "KoanSoftware.com"; char *revision = "Version %d.%d.pl%d [KOAN]"; // (M@K) - char *revision_date = REVISION_DATE; + char revision_date[64]; char *copyright = "(C)M.Stover"; int k=strlen(company)+1; int l; + snprintf(revision_date, sizeof(revision_date), + "mars-nwe-%d.%d.pl%d", + _VERS_H_, _VERS_L_, _VERS_P_); + revision_date[sizeof(revision_date)-1] = '\0'; + memset(responsedata, 0, 512); strcpy(responsedata, company); l = 1 + sprintf(responsedata+k, revision, _VERS_H_, _VERS_L_, _VERS_P_ ); + k += l; strcpy(responsedata+k, revision_date); k += (strlen(revision_date)+1); strcpy(responsedata+k, copyright);