From 4a9cd4c4f74441227dc2369ac6fe34a2ad5b6fbf Mon Sep 17 00:00:00 2001 From: Alexey Khromov Date: Sun, 26 May 2024 01:11:01 +0300 Subject: [PATCH] (f) --- source/bforce/prot_emsi.c | 8 ++++---- source/bforce/prot_emsi_misc.c | 4 ++-- source/include/bforce.h | 1 - source/include/includes.h | 8 ++++---- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/source/bforce/prot_emsi.c b/source/bforce/prot_emsi.c index 3395ebc..0495d38 100644 --- a/source/bforce/prot_emsi.c +++ b/source/bforce/prot_emsi.c @@ -819,13 +819,13 @@ void emsi_set_sysinfo(s_emsi *emsi, s_emsi *remote_emsi, int hrc, tzset(); if (conf_boolean(cf_emsi_send_tz)) { emsi->have_tzutc = 1; - emsi->tzutc = -(timezone/3600); + emsi->tzutc = time_gmtoffset()/60; } - if (conf_boolean(cf_emsi_send_time)) { + /*if (conf_boolean(cf_emsi_send_time)) { emsi->have_xdatetime = 1; - emsi->time = time(NULL); - } + emsi->time = time + }*/ /* ----------------------------------------------------------------- */ /* Data for {OHFR} field */ diff --git a/source/bforce/prot_emsi_misc.c b/source/bforce/prot_emsi_misc.c index c6422d0..a816698 100644 --- a/source/bforce/prot_emsi_misc.c +++ b/source/bforce/prot_emsi_misc.c @@ -518,7 +518,7 @@ int emsi_parsedat(char *emsi_dat, s_emsi *emsi) { int i; char *tmp, *p, *q, *n, *otmp; - otmp = malloc(80); + //otmp = malloc(80); while( (tmp=get_field(&emsi_dat, '{', '}')) != NULL ) { @@ -770,7 +770,7 @@ int emsi_parsedat(char *emsi_dat, s_emsi *emsi) strnxcat(emsi->addons, "}", sizeof(emsi->addons)); } } /* end of while */ - free(otmp); + //free(otmp); return(0); } diff --git a/source/include/bforce.h b/source/include/bforce.h index 3a4c297..a6a7679 100644 --- a/source/include/bforce.h +++ b/source/include/bforce.h @@ -182,7 +182,6 @@ typedef struct { extern const char *BFERR[]; extern char * mainenv[]; -extern long timezone; int daemon_run(const char *confname, const char *incname, bool quit); diff --git a/source/include/includes.h b/source/include/includes.h index c00f5e6..685b939 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -102,12 +102,12 @@ #endif #if TIME_WITH_SYS_TIME -#include -#include +# include +# include #elif HAVE_SYS_TIME -#include +# include #else -#include +# include #endif #ifdef HAVE_UNISTD_H