The Samba-Bugzilla – Attachment 7857 Details for
Bug 9127
Problem of pile up of winbindd client connections.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Test code patch for cleanup of dead connections.
samba-bug-9127.patch (text/plain), 1.45 KB, created by
ravindra (mail address dead)
on 2012-09-03 15:08:41 UTC
(
hide
)
Description:
Test code patch for cleanup of dead connections.
Filename:
MIME Type:
Creator:
ravindra (mail address dead)
Created:
2012-09-03 15:08:41 UTC
Size:
1.45 KB
patch
obsolete
>diff --git a/install_with_python.sh b/install_with_python.sh >old mode 100644 >new mode 100755 >diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c >index 248f747..dfaa60d 100644 >--- a/source3/winbindd/winbindd.c >+++ b/source3/winbindd/winbindd.c >@@ -932,8 +932,22 @@ static bool remove_idle_client(void) > struct winbindd_cli_state *state, *remove_state = NULL; > time_t last_access = 0; > int nidle = 0; >+ int count =0; >+ int i = 0; >+ >+ struct winbindd_cli_state* state_arr[50]; >+ for (i = 0; i < 50 ; i++) { >+ state_arr[i] = NULL; >+ } >+ > > for (state = winbindd_client_list(); state; state = state->next) { >+ >+ if (state->pid && (kill(state->pid, 0) == -1) && (count<50)) { >+ DEBUG(5,("Found dead client - %d and pid %u\n",count, state->pid)); >+ state_arr[count++] = state; >+ } >+ > if (client_is_idle(state)) { > nidle++; > if (!last_access || state->last_access < last_access) { >@@ -943,6 +957,15 @@ static bool remove_idle_client(void) > } > } > >+ if (count) { >+ for (i=0; i<50; i++) { >+ if (state_arr[i] && (state_arr[i] != remove_state) ) { >+ DEBUG(5,("Removing client - %d and pid %u\n",i, state_arr[i]->pid)); >+ remove_client(state_arr[i]); >+ } >+ } >+ } >+ > if (remove_state) { > DEBUG(5,("Found %d idle client connections, shutting down sock %d, pid %u\n", > nidle, remove_state->sock, (unsigned int)remove_state->pid));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9127
: 7857 |
7902
|
7930