VirtualBox

Changeset 85673 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Aug 10, 2020 4:02:28 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139806
Message:

IPRT: RTFTPServer -> RTFtpServer. bugref:9437

Location:
trunk/src/VBox/Runtime/tools
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/tools/Makefile.kmk

    r84540 r85673  
    140140 RTLdrFlt_SOURCES = RTLdrFlt.cpp
    141141
    142  # RTFTPServer implements a simple FTP server.
    143  PROGRAMS += RTFTPServer
    144  RTFTPServer_TEMPLATE = VBoxR3Tool
    145  RTFTPServer_SOURCES = RTFTPServer.cpp
     142 # RTFtpServer implements a simple FTP server.
     143 PROGRAMS += RTFtpServer
     144 RTFtpServer_TEMPLATE = VBoxR3Tool
     145 RTFtpServer_SOURCES = RTFtpServer.cpp
    146146
    147147 # RTGzip - our gzip clone (for testing the gzip/gunzip streaming code)
  • trunk/src/VBox/Runtime/tools/RTFtpServer.cpp

    r85672 r85673  
    22/** @file
    33 * IPRT - Utility for running a (simple) FTP server.
     4 *
     5 * Use this setup to best see what's going on:
     6 *    VBOX_LOG=rt_ftp=~0
     7 *    VBOX_LOG_DEST="nofile stderr"
     8 *    VBOX_LOG_FLAGS="unbuffered enabled thread msprog"
     9 *
    410 */
    511
     
    2531 */
    2632
    27 /*
    28  * Use this setup to best see what's going on:
    29  *
    30  *    VBOX_LOG=rt_ftp=~0
    31  *    VBOX_LOG_DEST="nofile stderr"
    32  *    VBOX_LOG_FLAGS="unbuffered enabled thread msprog"
    33  *
    34  */
    35 
    3633
    3734/*********************************************************************************************************************************
     
    111108/** Set by the signal handler when the FTP server shall be terminated. */
    112109static volatile bool  g_fCanceled = false;
    113 static FTPSERVERDATA  g_FTPServerData;
     110static FTPSERVERDATA  g_FtpServerData;
    114111
    115112
     
    512509    uint16_t uPort         = 2121;
    513510
    514     RT_ZERO(g_FTPServerData);
     511    RT_ZERO(g_FtpServerData);
    515512
    516513    /*
     
    546543
    547544            case 'r':
    548                 RTStrCopy(g_FTPServerData.szPathRootAbs, sizeof(g_FTPServerData.szPathRootAbs), ValueUnion.psz);
     545                RTStrCopy(g_FtpServerData.szPathRootAbs, sizeof(g_FtpServerData.szPathRootAbs), ValueUnion.psz);
    549546                break;
    550547
     
    581578    }
    582579
    583     if (!strlen(g_FTPServerData.szPathRootAbs))
     580    if (!strlen(g_FtpServerData.szPathRootAbs))
    584581    {
    585582        /* By default use the current directory as serving root directory. */
    586         rc = RTPathGetCurrent(g_FTPServerData.szPathRootAbs, sizeof(g_FTPServerData.szPathRootAbs));
     583        rc = RTPathGetCurrent(g_FtpServerData.szPathRootAbs, sizeof(g_FtpServerData.szPathRootAbs));
    587584        if (RT_FAILURE(rc))
    588585            return RTMsgErrorExit(RTEXITCODE_FAILURE, "Retrieving current directory failed: %Rrc", rc);
     
    590587
    591588    /* Initialize CWD. */
    592     RTStrPrintf2(g_FTPServerData.szCWD, sizeof(g_FTPServerData.szCWD), "/");
     589    RTStrPrintf2(g_FtpServerData.szCWD, sizeof(g_FtpServerData.szCWD), "/");
    593590
    594591    /* Install signal handler. */
     
    619616        RTFTPSERVER hFTPServer;
    620617        rc = RTFtpServerCreate(&hFTPServer, szAddress, uPort, &Callbacks,
    621                                &g_FTPServerData, sizeof(g_FTPServerData));
     618                               &g_FtpServerData, sizeof(g_FtpServerData));
    622619        if (RT_SUCCESS(rc))
    623620        {
    624621            RTPrintf("Starting FTP server at %s:%RU16 ...\n", szAddress, uPort);
    625             RTPrintf("Root directory is '%s'\n", g_FTPServerData.szPathRootAbs);
     622            RTPrintf("Root directory is '%s'\n", g_FtpServerData.szPathRootAbs);
    626623
    627624            RTPrintf("Running FTP server ...\n");
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette