Changeset 228 for branches/samba-3.2.x/source/winbindd/winbindd_dual.c
- Timestamp:
- May 26, 2009, 9:44:50 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/winbindd/winbindd_dual.c
r141 r228 121 121 SMB_ASSERT(continuation != NULL); 122 122 123 DEBUG(10, ("Sending request to child pid %d (domain=%s)\n", 124 (int)child->pid, 125 (child->domain != NULL) ? child->domain->name : "''")); 126 123 127 state = TALLOC_P(mem_ctx, struct winbindd_async_request); 124 128 … … 197 201 TALLOC_FREE(state->reply_timeout_event); 198 202 199 SMB_ASSERT(state->child_pid != (pid_t)0); 200 201 /* If not already reaped, send kill signal to child. */ 202 if (state->child->pid == state->child_pid) { 203 /* If child exists and is not already reaped, 204 send kill signal to child. */ 205 206 if ((state->child->pid != (pid_t)0) && 207 (state->child->pid != (pid_t)-1) && 208 (state->child->pid == state->child_pid)) { 203 209 kill(state->child_pid, SIGTERM); 204 210 … … 295 301 } 296 302 303 /* 304 * This may be a reschedule, so we might 305 * have an existing timeout event pending on 306 * the first entry in the child->requests list 307 * (we only send one request at a time). 308 * Ensure we free it before we reschedule. 309 * Bug #5814, from hargagan <shargagan@novell.com>. 310 * JRA. 311 */ 312 313 TALLOC_FREE(request->reply_timeout_event); 314 297 315 if ((child->pid == 0) && (!fork_domain_child(child))) { 298 /* Cancel all outstanding requests */ 316 /* fork_domain_child failed. 317 Cancel all outstanding requests */ 299 318 300 319 while (request != NULL) { 301 320 /* request might be free'd in the continuation */ 302 321 struct winbindd_async_request *next = request->next; 303 request->continuation(request->private_data, False); 322 323 async_request_fail(request); 304 324 request = next; 305 325 } … … 487 507 child->event.flags = 0; 488 508 child->pid = 0; 509 510 if (child->requests) { 511 /* 512 * schedule_async_request() will also 513 * clear this event but the call is 514 * idempotent so it doesn't hurt to 515 * cover all possible future code 516 * paths. JRA. 517 */ 518 TALLOC_FREE(child->requests->reply_timeout_event); 519 } 489 520 490 521 schedule_async_request(child); … … 1118 1149 set_domain_online_request(child->domain); 1119 1150 1120 if (primary_domain != child->domain) {1151 if (primary_domain && (primary_domain != child->domain)) { 1121 1152 /* We need to talk to the primary 1122 1153 * domain as well as the trusted
Note:
See TracChangeset
for help on using the changeset viewer.