Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository
In directory sc8-pr-cvs1:/tmp/cvs-serv10310/lib/SandWeb/Repository
Modified Files:
cvs.pm
Log Message:
made timeout a global option, now you can easily set a number of
seconds in the sandweb.cfg and CLI ops will time out at that time
( prevents runaway CVS/SSH processes and such ).
Default is 300 seconds ( 5 minutes ).
Index: cvs.pm
===================================================================
RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/cvs.pm,v
retrieving revision 1.45
retrieving revision 1.46
diff -U2 -r1.45 -r1.46
--- cvs.pm 1 Apr 2003 01:21:40 -0000 1.45
+++ cvs.pm 1 Apr 2003 02:46:27 -0000 1.46
@@ -161,4 +161,7 @@
my $system_password = $args{'system_password'} || '';
+ # system_timeout is the time limit for running on the CLI
+ my $system_timeout = $args{'system_timeout'} || '';
+
# log is a reference to an object based on the SandWeb::Log class
my $log = $args{'log_obj'} || '';
@@ -177,4 +180,5 @@
'system_username' => $system_username,
'system_password' => $system_password,
+ 'system_timeout' => $system_timeout,
'log' => $log,
}, $class;
@@ -2557,4 +2561,5 @@
my $system_username = $self->get_system_username() || '';
my $system_password = $self->get_system_password() || '';
+ my $system_timeout = $self->get_system_timeout() || '';
my $log = $self->get_log() || '';
@@ -2582,5 +2587,7 @@
'users_dir' => "$users_dir",
'vcs_password' => "$vcs_password",
+ 'system_timeout' => "$system_timeout",
'system_username' => "$system_username",
+ 'system_password' => "$system_password",
'bindir' => "$bindir",
'system' => "$system",
@@ -2887,4 +2894,70 @@
}
}
+=head1
+
+METHOD
+
+ get_system_timeout
+
+SYNOPSIS
+
+ my $return_code = $CVS->get_system_timeout();
+
+DESCRIPTION
+
+ Returns the current timeout setting for CLI operations ( in seconds ).
+
+PARAMETERS
+
+ None
+
+RETURN CODE
+
+ A string containing the current timeout in seconds is returned.
+
+ 0 = This means that the method got an error proccessing your request.
+ Perhaps an invalid parameter?
+
+ -1 = This return value means that there was not sufficient permision to
+ read the files specified, or they did not exist.
+
+
+=cut
+
+sub get_system_timeout {
+ my $self = shift;
+ return $self->{'system_timeout'};
+}
+
+=head1
+
+METHOD
+
+ get_log
+
+SYNOPSIS
+
+ my $logobj = $CVS->get_log();
+
+DESCRIPTION
+
+ Returns a reference to an instantiated log object.
+
+PARAMETERS
+
+ None
+
+RETURN CODE
+
+ A reference to an instantiated log object is returned.
+
+ 0 = This means that the method got an error proccessing your request.
+ Perhaps an invalid parameter?
+
+ -1 = This return value means that there was not sufficient permision to
+ read the files specified, or they did not exist.
+
+
+=cut
sub get_log {
|