SOURCES: tpop3d-reject.patch (NEW) - show number of clients
arekm
arekm at pld-linux.org
Thu Jul 10 13:24:58 CEST 2008
Author: arekm Date: Thu Jul 10 11:24:57 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- show number of clients
---- Files affected:
SOURCES:
tpop3d-reject.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/tpop3d-reject.patch
diff -u /dev/null SOURCES/tpop3d-reject.patch:1.1
--- /dev/null Thu Jul 10 13:24:58 2008
+++ SOURCES/tpop3d-reject.patch Thu Jul 10 13:24:52 2008
@@ -0,0 +1,23 @@
+diff --git a/netloop.c b/netloop.c
+index f39018b..51f7236 100644
+--- a/netloop.c
++++ b/netloop.c
+@@ -187,7 +187,7 @@ static void listeners_post_select(struct pollfd *pfds) {
+ if (num_running_children >= max_running_children || !(J = find_free_connection())) {
+ shutdown(s, 2);
+ close(s);
+- log_print(LOG_WARNING, _("listeners_post_select: rejected connection from %s to local address %s:%d owing to high load"), inet_ntoa(sin.sin_addr), inet_ntoa(sinlocal.sin_addr), htons(sinlocal.sin_port));
++ log_print(LOG_WARNING, _("listeners_post_select: rejected connection from %s to local address %s:%d owing to high load (%d of %d)"), inet_ntoa(sin.sin_addr), inet_ntoa(sinlocal.sin_addr), htons(sinlocal.sin_port), num_running_children, max_running_children);
+ } else {
+ /* Create connection object. */
+ if ((*J = connection_new(s, &sin, L)))
+@@ -442,7 +442,8 @@ static void connections_post_select(struct pollfd *pfds) {
+ case fork_and_setuid:
+ if (num_running_children >= max_running_children) {
+ connection_sendresponse(c, 0, _("Sorry, I'm too busy right now"));
+- log_print(LOG_WARNING, _("connections_post_select: client %s: rejected login owing to high load"), c->idstr);
++ log_print(LOG_WARNING, _("connections_post_select: client %s: rejected login owing to high load (%d of %d)"),
++ c->idstr, num_running_children, max_running_children);
+ c->do_shutdown = 1;
+ } else {
+ if (!fork_child(c))
================================================================
More information about the pld-cvs-commit
mailing list