Remove g_time1() call
This is not year 2038 compliant on systems with 32-bit integers. The call can be replaced with the standard C time() call. On POSIX systems, time_t is guaranteed to be an integer type.
This commit is contained in:
@@ -57,8 +57,8 @@ log_authfail_message(const char *username, const char *ip_addr)
|
||||
{
|
||||
ip_addr = "unknown";
|
||||
}
|
||||
LOG(LOG_LEVEL_INFO, "AUTHFAIL: user=%s ip=%s time=%d",
|
||||
username, ip_addr, g_time1());
|
||||
LOG(LOG_LEVEL_INFO, "AUTHFAIL: user=%s ip=%s time=%ld",
|
||||
username, ip_addr, (long)time(NULL));
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
@@ -674,7 +674,7 @@ session_start_wrapped(struct login_info *login_info,
|
||||
sd->win_mgr = window_manager_pid;
|
||||
sd->x_server = display_pid;
|
||||
sd->chansrv = chansrv_pid;
|
||||
sd->start_time = g_time1();
|
||||
sd->start_time = time(NULL);
|
||||
status = E_SCP_SCREATE_OK;
|
||||
}
|
||||
}
|
||||
@@ -860,7 +860,7 @@ session_process_child_exit(struct session_data *sd,
|
||||
}
|
||||
else if (pid == sd->win_mgr)
|
||||
{
|
||||
int wm_wait_time = g_time1() - sd->start_time;
|
||||
int wm_wait_time = time(NULL) - sd->start_time;
|
||||
|
||||
if (e->reason == E_PXR_STATUS_CODE && e->val == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user