Sends a QUIT command to the FTP server to end the session Arguments: None

Return TypeFunction nameArguments
hzEcodehzFtpClient::QuitSession(void)

Declared in file: hzFtpClient.h
Defined in file : hzFtpClient.cpp

Function Logic:

0:START 1:items items len rc 2:unknown 3:items 4:rc!=E_OK 5:items 6:rc 7:unknown 8:items 9:rc!=E_OK 10:items 11:items 12:items 13:Return E_OK

Function body:

hzEcode hzFtpClient::QuitSession (void)
{
   //  Sends a QUIT command to the FTP server to end the session
   //  
   //  Arguments: None
   //  
   //  Returns: E_SENDFAIL If the command could not be sent
   //     E_RECVFAIL If the server failed to acknowledge the command
   //     E_OK  If the operation was succussful
   _hzfunc("hzFtpClient::QuitSession") ;
   uint32_t    nRecv ;     //  Length of server response
   uint32_t    len ;       //  Length of client request
   hzEcode     rc ;        //  Return code
   threadLog("hzFtpClient::QuitSession. Quitting session: - ") ;
   sprintf(m_c_sbuf, "QUIT\r\n") ;
   len = strlen(m_c_sbuf) ;
   rc = m_ConnControl.Send(m_c_sbuf, len) ;
   if (rc == E_TIMEOUT)
       threadLog("Timed out whilst sending QUIT command\n") ;
   else if (rc != E_OK)
       threadLog("Could not send QUIT command\n") ;
   else
   {
       rc = m_ConnControl.Recv(m_c_sbuf, nRecv, 1024);
       if (rc == E_TIMEOUT)
           threadLog("Timed out whilst awaiting QUIT response\n") ;
       else if (rc != E_OK)
           threadLog("Could not recv QUIT response\n") ;
       else
           threadLog("FTP Quit Successful\n") ;
   }
   m_ConnControl.Close() ;
   return E_OK ;
}