Changeset 82733 in vbox
- Timestamp:
- Jan 14, 2020 12:20:17 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/ftp.h
r82732 r82733 126 126 /** Command not implemented, superfluous at this site. */ 127 127 RTFTPSERVER_REPLY_ERROR_CMD_NOT_IMPL_SUPERFLUOUS = 202, 128 /** System status report. */ 129 RTFTPSERVER_REPLY_SYSTEM_STATUS = 211, 128 130 /** Service ready for new user. */ 129 131 RTFTPSERVER_REPLY_READY_FOR_NEW_USER = 220, -
trunk/src/VBox/Runtime/generic/ftp-server.cpp
r82732 r82733 119 119 /** Changes the current working directory. */ 120 120 RTFTPSERVER_CMD_CWD, 121 /** Reports features supported by the server. */ 122 RTFTPSERVER_CMD_FEAT, 121 123 /** Lists a directory. */ 122 124 RTFTPSERVER_CMD_LIST, … … 275 277 static FNRTFTPSERVERCMD rtFtpServerHandleCDUP; 276 278 static FNRTFTPSERVERCMD rtFtpServerHandleCWD; 279 static FNRTFTPSERVERCMD rtFtpServerHandleFEAT; 277 280 static FNRTFTPSERVERCMD rtFtpServerHandleLIST; 278 281 static FNRTFTPSERVERCMD rtFtpServerHandleMODE; … … 312 315 { RTFTPSERVER_CMD_CDUP, "CDUP", rtFtpServerHandleCDUP }, 313 316 { RTFTPSERVER_CMD_CWD, "CWD", rtFtpServerHandleCWD }, 317 { RTFTPSERVER_CMD_FEAT, "FEAT", rtFtpServerHandleFEAT }, 314 318 { RTFTPSERVER_CMD_LIST, "LIST", rtFtpServerHandleLIST }, 315 319 { RTFTPSERVER_CMD_MODE, "MODE", rtFtpServerHandleMODE }, … … 329 333 }; 330 334 335 /** Feature string which represents all commands we support in addition to RFC 959. 336 * Must match the command table above. 337 * 338 * Don't forget the terminating ";" at each feature. */ 339 #define RTFTPSERVER_FEATURES_STRING \ 340 "SIZE;" /* Supports reporting file sizes. */ 331 341 332 342 /********************************************************************************************************************************* … … 810 820 } 811 821 822 static int rtFtpServerHandleFEAT(PRTFTPSERVERCLIENT pClient, uint8_t cArgs, const char * const *apcszArgs) 823 { 824 RT_NOREF(cArgs, apcszArgs); 825 826 int rc = rtFtpServerSendReplyRc(pClient, RTFTPSERVER_REPLY_SYSTEM_STATUS); /* Features begin */ 827 if (RT_SUCCESS(rc)) 828 { 829 rc = rtFtpServerSendReplyStr(pClient, RTFTPSERVER_FEATURES_STRING); 830 if (RT_SUCCESS(rc)) 831 rc = rtFtpServerSendReplyRc(pClient, RTFTPSERVER_REPLY_SYSTEM_STATUS); /* Features end */ 832 } 833 834 return rc; 835 } 836 812 837 static int rtFtpServerHandleLIST(PRTFTPSERVERCLIENT pClient, uint8_t cArgs, const char * const *apcszArgs) 813 838 {
Note:
See TracChangeset
for help on using the changeset viewer.