Update of /cvsroot/popfile/engine/Proxy
In directory sc8-pr-cvs1:/tmp/cvs-serv29613/Proxy
Modified Files:
Proxy.pm
Log Message:
Added suppress option to echo_response_
Index: Proxy.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Proxy/Proxy.pm,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** Proxy.pm 31 Jul 2003 16:32:21 -0000 1.29
--- Proxy.pm 1 Aug 2003 01:11:28 -0000 1.30
***************
*** 449,452 ****
--- 449,453 ----
# $command The text of the command to send (we add an EOL)
# $null_resp Allow a null response
+ # $suppress If set to 1 then the response does not go to the client
#
# Send $command to $mail, receives the response and echoes it to the $client and the debug
***************
*** 457,463 ****
sub get_response_
{
! my ( $self, $mail, $client, $command, $null_resp ) = @_;
$null_resp = 0 if (!defined $null_resp);
unless ( defined($mail) && $mail->connected ) {
--- 458,465 ----
sub get_response_
{
! my ( $self, $mail, $client, $command, $null_resp, $suppress ) = @_;
$null_resp = 0 if (!defined $null_resp);
+ $suppress = 0 if (!defined $suppress);
unless ( defined($mail) && $mail->connected ) {
***************
*** 481,486 ****
if ( $response ) {
# Echo the response up to the mail client
! $self->tee_( $client, $response );
return $response;
}
--- 483,490 ----
if ( $response ) {
+
# Echo the response up to the mail client
!
! $self->tee_( $client, $response ) if ( !$suppress );
return $response;
}
***************
*** 505,508 ****
--- 509,513 ----
# $client The local mail client (created with IO::) that needs the response
# $command The text of the command to send (we add an EOL)
+ # $suppress If set to 1 then the response does not go to the client
#
# Send $command to $mail, receives the response and echoes it to the $client and the debug
***************
*** 512,520 ****
sub echo_response_
{
! my ( $self, $mail, $client, $command ) = @_;
# Determine whether the response began with the string +OK. If it did then return 1
# else return 0
! return ( $self->get_response_( $mail, $client, $command ) =~ /$self->{good_response_}/ );
}
--- 517,525 ----
sub echo_response_
{
! my ( $self, $mail, $client, $command, $suppress ) = @_;
# Determine whether the response began with the string +OK. If it did then return 1
# else return 0
! return ( $self->get_response_( $mail, $client, $command, 0, $suppress ) =~ /$self->{good_response_}/ );
}
|