Hi Folks,

Does anybody here use the FTPEXIT EXEC to evaluate and/or modify FTP
commands?

I've got an FTPS client that sends redundant PROT P commands, after the
data channel has already been protected.  I wrote a piece of code to
check for this condition and change any redundant PROT P commands to
NOOP:

   Select                                                               
       When (subcmd = 'PROT') Then Do    /*Evaluate PROT P duplicate..*/
                                                                        
           If Strip(Cmd_Args)='P' & Data_Secure='2' Then Do             
               RetMsg   ='FTPEXIT: PROT P requested but Data channel',  
                         'already secure - request ignored.'            
               Return_Code=0       /*Have FTP process our RETSTRING*/   
               RetString='NOOP'    /*Change command to be a NOOP*/      
               If (debug?) Then Say RetMsg                              
               Signal FTPX_Return                                       
           End                                                          
                                                                        
       End                                                              
       Otherwise Nop                                                    
   End /* Select */  

I know this code is executing because I see my FTPEXIT: RetMsg on the
console, but the FTP Server is ignoring my RETSTRING (NOOP) and still
attempting to execute PROT P.

What am I doing wrong here?  Should I be using a RETURN_CODE other than
0 to indicate that FTP should evaluate my RETSTRING?

I'm confused.............. :(

-Mike

Reply via email to