In Class FtpRequestImpl the function hasArgument() returns true if the var
m_argument is "" (not null!)  I change the code  as see below. 


public void parse(String line) {
        
        // notify connection observer
        spyRequest(line);
        
        // parse request
        m_line = line;
        m_command = null;
        m_argument = null;
        int spInd = m_line.indexOf(' ');
        if(spInd != -1) {
            m_argument = m_line.substring(spInd + 1);
            m_command = m_line.substring(0, spInd).toUpperCase();
            
//HJB 03.01.2006 add line , because m_argument="" generates error (Webcam
LevelOne FS1040 sends mkd command <space> and nothing more)


            if (m_argument.equalsIgnoreCase("")) m_argument=null;
        }




        else {
            m_command = m_line.toUpperCase();
        }
        
        if( (m_command.length()>0) && (m_command.charAt(0)=='X') ) {
            m_command = m_command.substring(1);
        }
    }
    

Reply via email to