Some time_t/int conversions
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user