Changeset 82842 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Jan 23, 2020 10:16:23 AM (5 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/ftp-server.cpp
r82840 r82842 2035 2035 if (RT_SUCCESS(rc)) 2036 2036 { 2037 if ( pClient->pDataConn)2037 if (RT_SUCCESS(rc)) 2038 2038 { 2039 /* Note: Data connection gets created when the PORT command was sent. */ 2040 rc = rtFtpServerDataConnStart(pClient->pDataConn, rtFtpServerDataConnFileWriteThread, cArgs, apcszArgs); 2041 if (RT_SUCCESS(rc)) 2042 rc = rtFtpServerSendReplyRc(pClient, RTFTPSERVER_REPLY_FILE_STS_OK_OPENING_DATA_CONN); 2039 if (pClient->pDataConn == NULL) 2040 { 2041 rc = rtFtpServerDataConnCreate(pClient, &pClient->pDataConn); 2042 if (RT_SUCCESS(rc)) 2043 rc = rtFtpServerDataConnStart(pClient->pDataConn, rtFtpServerDataConnFileWriteThread, cArgs, apcszArgs); 2044 2045 int rc2 = rtFtpServerSendReplyRc( pClient, RT_SUCCESS(rc) 2046 ? RTFTPSERVER_REPLY_DATACONN_ALREADY_OPEN 2047 : RTFTPSERVER_REPLY_CANT_OPEN_DATA_CONN); 2048 AssertRC(rc2); 2049 } 2050 else 2051 { 2052 int rc2 = rtFtpServerSendReplyRc(pClient, RTFTPSERVER_REPLY_DATACONN_ALREADY_OPEN); 2053 AssertRC(rc2); 2054 } 2043 2055 } 2044 2056 else 2045 rc = VERR_FTP_DATA_CONN_NOT_FOUND; 2057 { 2058 int rc2 = rtFtpServerSendReplyRc(pClient, RTFTPSERVER_REPLY_CONN_REQ_FILE_ACTION_NOT_TAKEN); 2059 AssertRC(rc2); 2060 } 2046 2061 } 2047 2062 -
trunk/src/VBox/Runtime/tools/RTFTPServer.cpp
r82841 r82842 212 212 Assert(pData->cbUser == sizeof(FTPSERVERDATA)); 213 213 214 return RTFileOpen(&pThis->hFile, pcszPath, fMode); 214 char *pszPathAbs = NULL; 215 if (RTStrAPrintf(&pszPathAbs, "%s/%s", pThis->szPathRootAbs, pcszPath) <= 0) 216 return VERR_NO_MEMORY; 217 218 int rc = RTFileOpen(&pThis->hFile, pszPathAbs, fMode); 219 220 RTStrFree(pszPathAbs); 221 222 return rc; 215 223 } 216 224
Note:
See TracChangeset
for help on using the changeset viewer.