Changeset 427 for vendor/current/source3/winbindd/winbindd.c
- Timestamp:
- Apr 9, 2010, 3:20:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/winbindd/winbindd.c
r414 r427 571 571 state->pid = state->request->pid; 572 572 573 state->cmd_name = "unknown request"; 574 state->recv_fn = NULL; 575 573 576 /* Process command */ 574 577 … … 591 594 struct tevent_req *req; 592 595 593 DEBUG(10, ("process_request: Handling async request %s\n", 594 atable->cmd_name)); 596 state->cmd_name = atable->cmd_name; 597 state->recv_fn = atable->recv_req; 598 599 DEBUG(10, ("process_request: Handling async request %d:%s\n", 600 (int)state->pid, state->cmd_name)); 595 601 596 602 req = atable->send_req(state->mem_ctx, winbind_event_context(), … … 603 609 } 604 610 tevent_req_set_callback(req, wb_request_done, state); 605 state->recv_fn = atable->recv_req;606 611 return; 607 612 } … … 621 626 DEBUG(10,("process_request: request fn %s\n", 622 627 table->winbindd_cmd_name )); 628 state->cmd_name = table->winbindd_cmd_name; 623 629 table->fn(state); 624 630 break; … … 639 645 NTSTATUS status; 640 646 641 state->response = talloc_zero(state, struct winbindd_response); 647 state->response = talloc_zero(state->mem_ctx, 648 struct winbindd_response); 642 649 if (state->response == NULL) { 650 DEBUG(0, ("wb_request_done[%d:%s]: talloc_zero failed - removing client\n", 651 (int)state->pid, state->cmd_name)); 643 652 remove_client(state); 644 653 return; … … 649 658 status = state->recv_fn(req, state->response); 650 659 TALLOC_FREE(req); 660 661 DEBUG(10,("wb_request_done[%d:%s]: %s\n", 662 (int)state->pid, state->cmd_name, nt_errstr(status))); 663 651 664 if (!NT_STATUS_IS_OK(status)) { 652 DEBUG(10, ("returning %s\n", nt_errstr(status)));653 665 request_error(state); 654 666 return; … … 682 694 state->response); 683 695 if (req == NULL) { 696 DEBUG(10,("request_finished[%d:%s]: wb_resp_write_send() failed\n", 697 (int)state->pid, state->cmd_name)); 684 698 remove_client(state); 685 699 return; … … 700 714 close(state->sock); 701 715 state->sock = -1; 702 DEBUG(2, ("Could not write response to client: %s\n",703 strerror(err)));716 DEBUG(2, ("Could not write response[%d:%s] to client: %s\n", 717 (int)state->pid, state->cmd_name, strerror(err))); 704 718 remove_client(state); 705 719 return; 706 720 } 721 722 DEBUG(10,("winbind_client_response_written[%d:%s]: deliverd response to client\n", 723 (int)state->pid, state->cmd_name)); 707 724 708 725 TALLOC_FREE(state->mem_ctx); 709 726 state->response = NULL; 727 state->cmd_name = "no request"; 728 state->recv_fn = NULL; 710 729 711 730 req = wb_req_read_send(state, winbind_event_context(), state->sock,
Note:
See TracChangeset
for help on using the changeset viewer.