Author: jhb Date: Fri Oct 17 19:55:12 2014 New Revision: 273238 URL: https://svnweb.freebsd.org/changeset/base/273238
Log: MFC 272668: 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 Modified: stable/9/usr.sbin/nscd/query.c Directory Properties: stable/9/usr.sbin/nscd/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/nscd/query.c Directory Properties: stable/10/ (props changed) Modified: stable/9/usr.sbin/nscd/query.c ============================================================================== --- stable/9/usr.sbin/nscd/query.c Fri Oct 17 19:28:21 2014 (r273237) +++ stable/9/usr.sbin/nscd/query.c Fri Oct 17 19:55:12 2014 (r273238) @@ -1253,8 +1253,8 @@ init_query_state(int sockfd, size_t keve 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); _______________________________________________ svn-src-stable-9@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9 To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"