From: Sam S. <ssc...@us...> - 2005-02-28 12:36:16
|
Update of /cvsroot/popfile/engine/Proxy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21831/Proxy Modified Files: Proxy.pm Log Message: Test coverage for configure_item, validate_item and register_configuration_item for Proxy::Proxy Coverage now at 91%, coverage still needed for SSL and socks connection method Index: Proxy.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/Proxy.pm,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** Proxy.pm 20 Feb 2005 10:06:01 -0000 1.57 --- Proxy.pm 28 Feb 2005 12:36:06 -0000 1.58 *************** *** 214,219 **** # we're off. ! if ( ( defined( $self->{selector__}->can_read(0) ) ) && ! ( $self->{alive_} ) ) { if ( my $client = $self->{server__}->accept() ) { --- 214,219 ---- # we're off. ! if ( ( defined( $self->{selector__}->can_read(0) ) ) && # PROFILE BLOCK START ! ( $self->{alive_} ) ) { # PROFILE BLOCK STOP if ( my $client = $self->{server__}->accept() ) { *************** *** 221,226 **** if ( $self->{api_session__} eq '' ) { ! $self->{api_session__} = ! $self->classifier_()->get_session_key( 'admin', '' ); } --- 221,226 ---- if ( $self->{api_session__} eq '' ) { ! $self->{api_session__} = # PROFILE BLOCK START ! $self->classifier_()->get_session_key( 'admin', '' ); # PROFILE BLOCK STOP } *************** *** 230,238 **** # just anyone's email ! my ( $remote_port, $remote_host ) = sockaddr_in( ! $client->peername() ); ! if ( ( ( $self->config_( 'local' ) || 0 ) == 0 ) || ! ( $remote_host eq inet_aton( "127.0.0.1" ) ) ) { # If we have force_fork turned on then we will do a --- 230,238 ---- # just anyone's email ! my ( $remote_port, $remote_host ) = sockaddr_in( # PROFILE BLOCK START ! $client->peername() ); # PROFILE BLOCK STOP ! if ( ( ( $self->config_( 'local' ) || 0 ) == 0 ) || # PROFILE BLOCK START ! ( $remote_host eq inet_aton( "127.0.0.1" ) ) ) { # PROFILE BLOCK STOP # If we have force_fork turned on then we will do a *************** *** 250,255 **** if ( !defined( $pid ) || ( $pid == 0 ) ) { ! $self->{child_}( $self, $client, ! $self->{api_session__} ); if ( defined( $pid ) ) { &{$self->{childexit_}}(0) --- 250,255 ---- if ( !defined( $pid ) || ( $pid == 0 ) ) { ! $self->{child_}( $self, $client, # PROFILE BLOCK START ! $self->{api_session__} ); # PROFILE BLOCK STOP if ( defined( $pid ) ) { &{$self->{childexit_}}(0) *************** *** 589,595 **** my ( $self, $name, $templ ) = @_; ! $templ->param( 'Socks_Widget_Name' => $self->name() ); ! $templ->param( 'Socks_Server' => $self->config_( 'socks_server' ) ); ! $templ->param( 'Socks_Port' => $self->config_( 'socks_port' ) ); } --- 589,600 ---- my ( $self, $name, $templ ) = @_; ! my $me = $self->name(); ! ! if ( $name eq $me . "_socks_configuration" ) { ! ! $templ->param( 'Socks_Widget_Name' => $me ); ! $templ->param( 'Socks_Server' => $self->config_( 'socks_server' ) ); ! $templ->param( 'Socks_Port' => $self->config_( 'socks_port' ) ); ! } } *************** *** 613,629 **** my ($status, $error); ! if ( defined($$form{"$me" . "_socks_port"}) ) { ! if ( ( $$form{"$me" . "_socks_port"} >= 1 ) && ( $$form{"$me" . "_socks_port"} < 65536 ) ) { ! $self->config_( 'socks_port', $$form{"$me" . "_socks_port"} ); ! $status = sprintf( $$language{Configuration_SOCKSPortUpdate}, $self->config_( 'socks_port' ) ); ! } else { ! $error = $$language{Configuration_Error8}; } - } ! if ( defined($$form{"$me" . "_socks_server"}) ) { ! $self->config_( 'socks_server', $$form{"$me" . "_socks_server"} ); ! $status .= "\n" if (defined $status); ! $status .= sprintf( $$language{Configuration_SOCKSServerUpdate}, $self->config_( 'socks_server' ) ); } --- 618,636 ---- my ($status, $error); ! if ( $name eq $me . "_socks_configuration" ) { ! if ( defined($$form{"$me" . "_socks_port"}) ) { ! if ( ( $$form{"$me" . "_socks_port"} >= 1 ) && ( $$form{"$me" . "_socks_port"} < 65536 ) ) { ! $self->config_( 'socks_port', $$form{"$me" . "_socks_port"} ); ! $status = sprintf( $$language{Configuration_SOCKSPortUpdate}, $self->config_( 'socks_port' ) ); ! } else { ! $error = $$language{Configuration_Error8}; ! } } ! if ( defined($$form{"$me" . "_socks_server"}) ) { ! $self->config_( 'socks_server', $$form{"$me" . "_socks_server"} ); ! $status .= "\n" if (defined $status); ! $status .= sprintf( $$language{Configuration_SOCKSServerUpdate}, $self->config_( 'socks_server' ) ); ! } } |