[SCM] Samba Shared Repository - branch v3-6-test updated
Volker Lendecke
vlendec at samba.org
Thu Aug 26 10:28:34 MDT 2010
The branch, v3-6-test has been updated
via 289e0bc winbindd: Add the client status in the clients list output
via e35fc9b winbindd: useless function
from 5f28c91 s3:smbd: add nfs quota support to the linux-non-sysquota code
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit 289e0bcbd9966f42b00cfdde1b530762e1875d85
Author: Pierre Carrier <geoffroy.carrier at gmail.com>
Date: Mon Aug 23 00:53:40 2010 +0100
winbindd: Add the client status in the clients list output
Hello list,
Considered relevant by a customer.
As I suppose one doesn't send SIGUSR2 very often, I didn't bother adding another DEBUGLEVEL.
--
Pierre
commit e35fc9b4bc74c6d5153267dafdf0d27b4d90abdf
Author: Pierre Carrier <geoffroy.carrier at gmail.com>
Date: Mon Aug 23 00:53:39 2010 +0100
winbindd: useless function
Hello list,
Seems simple enough for my first patch :)
--
Pierre
-----------------------------------------------------------------------
Summary of changes:
source3/winbindd/winbindd.c | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 3a9643d..c8b3679 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -34,6 +34,7 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
+static bool client_is_idle(struct winbindd_cli_state *state);
static void remove_client(struct winbindd_cli_state *state);
static bool opt_nocache = False;
@@ -93,19 +94,13 @@ static void winbindd_status(void)
if (DEBUGLEVEL >= 2 && winbindd_num_clients()) {
DEBUG(2, ("\tclient list:\n"));
for(tmp = winbindd_client_list(); tmp; tmp = tmp->next) {
- DEBUGADD(2, ("\t\tpid %lu, sock %d\n",
- (unsigned long)tmp->pid, tmp->sock));
+ DEBUGADD(2, ("\t\tpid %lu, sock %d (%s)\n",
+ (unsigned long)tmp->pid, tmp->sock,
+ client_is_idle(tmp) ? "idle" : "active"));
}
}
}
-/* Print winbindd status to log file */
-
-static void print_winbindd_status(void)
-{
- winbindd_status();
-}
-
/* Flush client cache */
static void flush_caches(void)
@@ -325,7 +320,7 @@ static void winbindd_sig_usr2_handler(struct tevent_context *ev,
void *siginfo,
void *private_data)
{
- print_winbindd_status();
+ winbindd_status();
}
static bool winbindd_setup_sig_usr2_handler(void)
@@ -863,6 +858,13 @@ static void remove_client(struct winbindd_cli_state *state)
TALLOC_FREE(state);
}
+/* Is a client idle? */
+
+static bool client_is_idle(struct winbindd_cli_state *state) {
+ return (state->response == NULL &&
+ !state->pwent_state && !state->grent_state);
+}
+
/* Shutdown client connection which has been idle for the longest time */
static bool remove_idle_client(void)
@@ -872,8 +874,7 @@ static bool remove_idle_client(void)
int nidle = 0;
for (state = winbindd_client_list(); state; state = state->next) {
- if (state->response == NULL &&
- !state->pwent_state && !state->grent_state) {
+ if (client_is_idle(state)) {
nidle++;
if (!last_access || state->last_access < last_access) {
last_access = state->last_access;
--
Samba Shared Repository
More information about the samba-cvs
mailing list