Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PFTPServer::ProcessCommand (  )

Process commands, dispatching to the appropriate virtual function. This is used when the socket is acting as a server.

Returns:
TRUE if more processing may be done, FALSE if the QUIT command was received or the OnUnknown()# function returns FALSE.

Definition at line 145 of file ftpsrvr.cxx.

References CheckLoginRequired(), DispatchCommand(), OnUnknown(), PInternetProtocol::ReadCommand(), and PInternetProtocol::WriteResponse().

{
  PString args;
  PINDEX code;
  if (!ReadCommand(code, args))
    return FALSE;

  if (code == P_MAX_INDEX)
    return OnUnknown(args);

  //  handle commands that require login
  if (state == Connected || !CheckLoginRequired(code)) 
    return DispatchCommand(code, args);
  
  // otherwise enforce login
  WriteResponse(530, "Please login with USER and PASS.");
  return TRUE;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index