This commit is contained in:
Alexey Khromov 2024-05-26 01:11:01 +03:00
parent 3b7e0121e6
commit 4a9cd4c4f7
4 changed files with 10 additions and 11 deletions

View File

@ -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 */

View File

@ -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);
}

View File

@ -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);

View File

@ -102,12 +102,12 @@
#endif
#if TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
# include <sys/time.h>
# include <time.h>
#elif HAVE_SYS_TIME
#include <sys/time.h>
# include <sys/time.h>
#else
#include <time.h>
# include <time.h>
#endif
#ifdef HAVE_UNISTD_H