Some time_t/int conversions

This commit is contained in:
Michiel Broek
2005-10-16 11:37:54 +00:00
parent 47e52ffb35
commit eef02cca1a
7 changed files with 37 additions and 31 deletions

View File

@@ -130,8 +130,8 @@ int answer(char *stype)
c_end = time(NULL);
online += (c_end - c_start);
history.online = c_start;
history.offline = c_end;
history.online = (int)c_start;
history.offline = (int)c_end;
history.sent_bytes = sentbytes;
history.rcvd_bytes = rcvdbytes;
history.inbound = TRUE;
@@ -147,7 +147,7 @@ int answer(char *stype)
free(p);
if (Loaded) {
nodes.LastDate = time(NULL);
nodes.LastDate = (int32_t)time(NULL);
UpdateNode();
}
}

View File

@@ -121,8 +121,8 @@ int hangup()
online += (c_end - c_start);
Syslog('+', "Connection time %s", t_elapsed(c_start, c_end));
carrier = FALSE;
history.offline = c_end;
history.online = c_start;
history.offline = (int)c_end;
history.online = (int)c_start;
history.sent_bytes = sentbytes;
history.rcvd_bytes = rcvdbytes;
history.inbound = ~master;

View File

@@ -214,8 +214,8 @@ int main(int argc, char *argv[])
WriteError("$Can't create %s", cmd);
} else {
memset(&history, 0, sizeof(history));
history.online = time(NULL);
history.offline = time(NULL);
history.online = (int)time(NULL);
history.offline = (int)time(NULL);
fwrite(&history, sizeof(history), 1, fp);
fclose(fp);
Syslog('+', "Created new %s", cmd);

View File

@@ -189,8 +189,8 @@ void closetcp(void)
online += (c_end - c_start);
Syslog('+', "Closing TCP connection, connected %s", t_elapsed(c_start, c_end));
carrier = FALSE;
history.offline = c_end;
history.online = c_start;
history.offline = (int)c_end;
history.online = (int)c_start;
history.sent_bytes = sentbytes;
history.rcvd_bytes = rcvdbytes;
history.inbound = ~master;