Ignore:
Timestamp:
May 26, 2009, 9:44:50 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.2 branch to 3.2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.2.x/source/winbindd/winbindd_dual.c

    r141 r228  
    121121        SMB_ASSERT(continuation != NULL);
    122122
     123        DEBUG(10, ("Sending request to child pid %d (domain=%s)\n",
     124                (int)child->pid,
     125                (child->domain != NULL) ? child->domain->name : "''"));
     126
    123127        state = TALLOC_P(mem_ctx, struct winbindd_async_request);
    124128
     
    197201        TALLOC_FREE(state->reply_timeout_event);
    198202
    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)) {
    203209                kill(state->child_pid, SIGTERM);
    204210
     
    295301        }
    296302
     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
    297315        if ((child->pid == 0) && (!fork_domain_child(child))) {
    298                 /* Cancel all outstanding requests */
     316                /* fork_domain_child failed.
     317                   Cancel all outstanding requests */
    299318
    300319                while (request != NULL) {
    301320                        /* request might be free'd in the continuation */
    302321                        struct winbindd_async_request *next = request->next;
    303                         request->continuation(request->private_data, False);
     322
     323                        async_request_fail(request);
    304324                        request = next;
    305325                }
     
    487507        child->event.flags = 0;
    488508        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        }
    489520
    490521        schedule_async_request(child);
     
    11181149                set_domain_online_request(child->domain);
    11191150
    1120                 if (primary_domain != child->domain) {
     1151                if (primary_domain && (primary_domain != child->domain)) {
    11211152                        /* We need to talk to the primary
    11221153                         * domain as well as the trusted
Note: See TracChangeset for help on using the changeset viewer.