Changeset 988 for vendor/current/source3/nmbd/asyncdns.c
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/nmbd/asyncdns.c
r740 r988 3 3 a async DNS handler 4 4 Copyright (C) Andrew Tridgell 1997-1998 5 5 6 6 This program is free software; you can redistribute it and/or modify 7 7 it under the terms of the GNU General Public License as published by 8 8 the Free Software Foundation; either version 3 of the License, or 9 9 (at your option) any later version. 10 10 11 11 This program is distributed in the hope that it will be useful, 12 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 GNU General Public License for more details. 15 15 16 16 You should have received a copy of the GNU General Public License 17 17 along with this program. If not, see <http://www.gnu.org/licenses/>. … … 20 20 #include "includes.h" 21 21 #include "nmbd/nmbd.h" 22 #include "lib/util/sys_rw_data.h" 22 23 23 24 /*************************************************************************** … … 31 32 32 33 pull_ascii_nstring(qname, sizeof(qname), question->name); 33 34 34 35 if (!addr.s_addr) { 35 36 /* add the fail to WINS cache of names. give it 1 hour in the cache */ … … 91 92 NTSTATUS status; 92 93 93 status = read_data (fd_in, (char *)&r, sizeof(r));94 status = read_data_ntstatus(fd_in, (char *)&r, sizeof(r)); 94 95 95 96 if (!NT_STATUS_IS_OK(status)) { … … 136 137 create a child process to handle DNS lookups 137 138 ****************************************************************************/ 138 void start_async_dns( void)139 void start_async_dns(struct messaging_context *msg) 139 140 { 140 141 int fd1[2], fd2[2]; … … 148 149 } 149 150 150 child_pid = sys_fork();151 child_pid = fork(); 151 152 152 153 if (child_pid) { … … 167 168 CatchSignal(SIGTERM, sig_term); 168 169 169 status = reinit_after_fork(nmbd_messaging_context(), 170 nmbd_event_context(), 171 procid_self(), true); 170 status = reinit_after_fork(msg, nmbd_event_context(), true, NULL); 172 171 173 172 if (!NT_STATUS_IS_OK(status)) { … … 206 205 check the DNS queue 207 206 ****************************************************************************/ 208 void run_dns_queue( void)207 void run_dns_queue(struct messaging_context *msg) 209 208 { 210 209 struct query_record r; … … 219 218 close(fd_in); 220 219 close(fd_out); 221 start_async_dns( );222 } 223 224 status = read_data (fd_in, (char *)&r, sizeof(r));220 start_async_dns(msg); 221 } 222 223 status = read_data_ntstatus(fd_in, (char *)&r, sizeof(r)); 225 224 226 225 if (!NT_STATUS_IS_OK(status)) {
Note:
See TracChangeset
for help on using the changeset viewer.