"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "source3/winbindd/winbindd_dual.c" between
samba-4.12.3.tar.gz and samba-4.12.5.tar.gz

About: Samba is the standard Windows interoperability suite of programs for Linux and Unix providing secure, stable and fast file and print services for all clients using the SMB/CIFS protocol. 4.12 series.

winbindd_dual.c  (samba-4.12.3):winbindd_dual.c  (samba-4.12.5)
skipping to change at line 205 skipping to change at line 205
struct tevent_req *subreq; struct tevent_req *subreq;
req = tevent_req_create(mem_ctx, &state, req = tevent_req_create(mem_ctx, &state,
struct wb_child_request_state); struct wb_child_request_state);
if (req == NULL) { if (req == NULL) {
return NULL; return NULL;
} }
state->ev = ev; state->ev = ev;
state->child = child; state->child = child;
state->request = request;
/*
* We have to make a copy of "request", because our caller
* might drop us via talloc_free().
*
* The talloc_move() magic in wb_child_request_cleanup() keeps
* all the requests, but if we are sitting deep within
* writev_send() down to the client, we have given it the
* pointer to "request". As our caller lost interest, it will
* just free "request", while writev_send still references it.
*/
state->request = talloc_memdup(state, request, sizeof(*request));
if (tevent_req_nomem(state->request, req)) {
return tevent_req_post(req, ev);
}
if (request->extra_data.data != NULL) {
state->request->extra_data.data = talloc_memdup(
state->request,
request->extra_data.data,
request->extra_len);
if (tevent_req_nomem(state->request->extra_data.data, req)) {
return tevent_req_post(req, ev);
}
}
subreq = tevent_queue_wait_send(state, ev, child->queue); subreq = tevent_queue_wait_send(state, ev, child->queue);
if (tevent_req_nomem(subreq, req)) { if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev); return tevent_req_post(req, ev);
} }
tevent_req_set_callback(subreq, wb_child_request_waited, req); tevent_req_set_callback(subreq, wb_child_request_waited, req);
state->queue_subreq = subreq; state->queue_subreq = subreq;
tevent_req_set_cleanup_fn(req, wb_child_request_cleanup); tevent_req_set_cleanup_fn(req, wb_child_request_cleanup);
skipping to change at line 333 skipping to change at line 358
* Our caller gave up, but we need to keep * Our caller gave up, but we need to keep
* the low level request (wb_simple_trans) * the low level request (wb_simple_trans)
* in order to maintain the parent child protocol. * in order to maintain the parent child protocol.
* *
* We also need to keep the child queue blocked * We also need to keep the child queue blocked
* until we got the response from the child. * until we got the response from the child.
*/ */
subreq = talloc_move(state->child->queue, &state->subreq); subreq = talloc_move(state->child->queue, &state->subreq);
talloc_move(subreq, &state->queue_subreq); talloc_move(subreq, &state->queue_subreq);
talloc_move(subreq, &state->request);
tevent_req_set_callback(subreq, tevent_req_set_callback(subreq,
wb_child_request_orphaned, wb_child_request_orphaned,
state->child); state->child);
DBG_WARNING("keep orphaned subreq[%p]\n", subreq); DBG_WARNING("keep orphaned subreq[%p]\n", subreq);
return; return;
} }
TALLOC_FREE(state->subreq); TALLOC_FREE(state->subreq);
TALLOC_FREE(state->queue_subreq); TALLOC_FREE(state->queue_subreq);
 End of changes. 2 change blocks. 
1 lines changed or deleted 27 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)