Skip to content
Snippets Groups Projects
Commit 5b8577ae authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't use time_t in scfg_t definition

sbbsctrl.exe is built with Borland C++ still which only has a 32-bit time_t, so to keep the scfg_t definition compatible between MSVC and Borland builds, use time32_t (32-bit time_t) values only.

This fixes the reported sbbsctrl.exe error:
Error loading configuration
cfg->size (23944) != sizeof(scfg_t) (23952)

Introduced in commit e535aaac.
Reported via DOVE-Net by  Daryl Stout (TBOLT), confirmed by Nightfox (DIGDIST).
parent 3c55d333
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2473 passed
......@@ -620,7 +620,7 @@ typedef struct
// Run-time state information (not configuration)
int tls_certificate;
time_t tls_cert_file_date;
time32_t tls_cert_file_date;
} scfg_t;
......
......@@ -291,7 +291,7 @@ CRYPT_CONTEXT get_ssl_cert(scfg_t *cfg, char **estr, int *level)
return -1;
pthread_mutex_lock(&ssl_cert_mutex);
SAFEPRINTF2(str,"%s%s",cfg->ctrl_dir,"ssl.cert");
time_t fd = fdate(str);
time32_t fd = (time32_t)fdate(str);
if (cfg->tls_certificate != -1 || !cfg->prepped) {
if (fd == cfg->tls_cert_file_date) {
pthread_mutex_unlock(&ssl_cert_mutex);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment