Return TypeFunction nameArguments
hzEcodehzFtpClient::QuitSession(void)

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

Function Logic:

0:START 1:sprintf strlen len hzTcpClient::Send rc 2:rc==E_TIMEOUT 3:rc!=E_OK 4:hzTcpClient::Recv rc 5:rc==E_TIMEOUT 6:rc!=E_OK 7:hzTcpClient::Close 8:Return E_OK

Function body:

hzEcode hzFtpClient::QuitSession (void)
{
   _hzfunc("hzFtpClient::QuitSession") ;
   uint32_t    nRecv ;
   uint32_t    len ;
   hzEcode     rc ;
   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 ;
}