From dddbcdb8ae46cd5017aa6c1a107b1d151d1c85f7 Mon Sep 17 00:00:00 2001 From: katagia Date: Thu, 13 Nov 2003 15:33:17 +0000 Subject: [PATCH] changed lamdaemon to submit only 30 requests via ssh. I had trouble with 600 requests at once --- lam/lib/lamdaemon.pl | 15 ++++++++++++--- lam/templates/account/groupedit.php | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lam/lib/lamdaemon.pl b/lam/lib/lamdaemon.pl index 1aa1f21d..5d0ade54 100755 --- a/lam/lib/lamdaemon.pl +++ b/lam/lib/lamdaemon.pl @@ -197,9 +197,16 @@ else { $username[0] =~ s/uid=//; $password = $ARGV[1]; # Put all transfered lines in one string + $i = 0; + $j = 0; if ($ARGV[2] ne "*test") { while (defined($input = )) { - $string = $string. $input; + $string[$i] .= $input; + $j++; + if ($j==30) { + $j=0; + $i++; + } } } else { $argv = "*test\n"; } @@ -207,6 +214,8 @@ else { "UserKnownHostsFile /dev/null" ]); $ssh->login($username[0], $password); - ($stdout, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string); - print "$stdout"; + foreach $string2 ( @string ) { + ($stdout, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string2); + print "$stdout"; + } } diff --git a/lam/templates/account/groupedit.php b/lam/templates/account/groupedit.php index 019d9ecf..a87b5373 100644 --- a/lam/templates/account/groupedit.php +++ b/lam/templates/account/groupedit.php @@ -460,7 +460,7 @@ echo "\n". if (is_array($errors)) for ($i=0; $i