mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 01:01:06 +00:00
Properly set the timeout in a query_state. The global query_timeout
configuration value is an integer count of seconds, it is not a timeval. Using memcpy() to copy a timeval from it put garbage into the tv_usec field. PR: 194025 Submitted by: David Shane Holden <dpejesh@yahoo.com> MFC after: 1 week
This commit is contained in:
parent
a2f67d9087
commit
23c7e79ad8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272668
|
@ -1253,8 +1253,8 @@ init_query_state(int sockfd, size_t kevent_watermark, uid_t euid, gid_t egid)
|
|||
retval->read_func = query_socket_read;
|
||||
|
||||
get_time_func(&retval->creation_time);
|
||||
memcpy(&retval->timeout, &s_configuration->query_timeout,
|
||||
sizeof(struct timeval));
|
||||
retval->timeout.tv_sec = s_configuration->query_timeout;
|
||||
retval->timeout.tv_usec = 0;
|
||||
|
||||
TRACE_OUT(init_query_state);
|
||||
return (retval);
|
||||
|
|
Loading…
Reference in a new issue