1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-13 21:36:09 +02:00

cvsserver: Introduce new state variable 'method'

$state->{method} contains the CVS access method used,
either 'ext' or 'pserver'

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Frank Lichtenheld 2007-03-19 16:55:57 +01:00 committed by Junio C Hamano
parent 1d848f643c
commit 80573baec4

View File

@ -91,7 +91,9 @@
# if we are called with a pserver argument,
# deal with the authentication cat before entering the
# main loop
$state->{method} = 'ext';
if (@ARGV && $ARGV[0] eq 'pserver') {
$state->{method} = 'pserver';
my $line = <STDIN>; chomp $line;
unless( $line eq 'BEGIN AUTH REQUEST') {
die "E Do not understand $line - expecting BEGIN AUTH REQUEST\n";
@ -1026,7 +1028,7 @@ sub req_ci
$log->info("req_ci : " . ( defined($data) ? $data : "[NULL]" ));
if ( @ARGV && $ARGV[0] eq 'pserver')
if ( $state->{method} eq 'pserver')
{
print "error 1 pserver access cannot commit\n";
exit;