r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
[tprouty/samba.git] / source / nsswitch / winbindd_dual.c
index 4363bf0f935168e7bb621c827a705cc0617d1d84..92e5782fa38d6c97e6b71b9aa9523f82b08b575b 100644 (file)
@@ -8,7 +8,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -17,8 +17,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 /*
@@ -131,7 +130,6 @@ void async_request(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
        state->response = response;
        state->continuation = continuation;
        state->private_data = private_data;
-       state->child_pid = child->pid;
 
        DLIST_ADD_END(child->requests, state, struct winbindd_async_request *);
 
@@ -306,6 +304,9 @@ static void schedule_async_request(struct winbindd_child *child)
                return;
        }
 
+       /* Now we know who we're sending to - remember the pid. */
+       request->child_pid = child->pid;
+
        setup_async_write(&child->event, request->request,
                          sizeof(*request->request),
                          async_main_request_sent, request);