nwbind: use build date in server information
All checks were successful
Source release / source-package (push) Successful in 49s
All checks were successful
Source release / source-package (push) Successful in 49s
Keep the server information fields semantically distinct after replacing the legacy KOAN/14-Jun-03 strings. The revision string now reports the Mars NWE release version, for example: Mars NWE 0.99.pl28 and the separate revision-date field is populated from a CMake-provided build date in the traditional NetWare-style format, for example: 27-May-26 The build date can be overridden through CMake for reproducible builds; otherwise it defaults to the current UTC build date.
This commit is contained in:
@@ -18,6 +18,7 @@ add_definitions(
|
||||
-D_VERS_H_=${VERSION_MAJOR}
|
||||
-D_VERS_L_=${VERSION_MINOR}
|
||||
-D_VERS_P_=${VERSION_PATCH}
|
||||
-DMARS_NWE_BUILD_DATE=\"${MARS_NWE_BUILD_DATE}\"
|
||||
)
|
||||
|
||||
IF(MARS_NWE_QUOTA_SUPPORT)
|
||||
|
||||
18
src/nwbind.c
18
src/nwbind.c
@@ -1,5 +1,9 @@
|
||||
/* nwbind.c */
|
||||
|
||||
#ifndef MARS_NWE_BUILD_DATE
|
||||
#define MARS_NWE_BUILD_DATE "unknown"
|
||||
#endif
|
||||
|
||||
/* NCP Bindery SUB-SERVER */
|
||||
/* authentification and some message and queue handling */
|
||||
|
||||
@@ -1748,17 +1752,13 @@ static void handle_fxx(int gelen, int func)
|
||||
} break;
|
||||
|
||||
case 0xc9 : { /* GET FILE SERVER DESCRIPTION STRINGs */
|
||||
char *company = "KoanSoftware.com";
|
||||
char *revision = "Version %d.%d.pl%d [KOAN]"; // (M@K)
|
||||
char revision_date[64];
|
||||
char *copyright = "(C)M.Stover";
|
||||
char *company = "www.disconnected-by-peer.at";
|
||||
char *revision = "Mars NWE %d.%d.pl%d";
|
||||
char *revision_date = MARS_NWE_BUILD_DATE;
|
||||
char *copyright = "(C) Martin Stover and contributors";
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user