VirtualBox

Ignore:
Timestamp:
Dec 9, 2020 2:08:45 PM (4 years ago)
Author:
vboxsync
Message:

Shared Clipboard/Transfers: Pointer to port number is optional in ShClTransferHttpServerCreate(). bugref:9874

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-http.cpp

    r87065 r87066  
    283283 * @returns VBox status code.
    284284 * @param   pSrv                HTTP server instance to create.
    285  * @param   puPort              Where to return the TCP port number being used on success.
     285 * @param   puPort              Where to return the TCP port number being used on success. Optional.
    286286 */
    287287int ShClTransferHttpServerCreate(PSHCLHTTPSERVER pSrv, uint16_t *puPort)
    288288{
    289289    AssertPtrReturn(pSrv, VERR_INVALID_POINTER);
    290     AssertPtrReturn(puPort, VERR_INVALID_POINTER);
     290    /* puPort is optional. */
    291291
    292292    /** @todo Try favorite ports first (e.g. 8080, 8000, ...)? */
     
    300300        {
    301301            uPort = RTRandAdvU32Ex(hRand, 1024, UINT16_MAX);
    302 #ifdef DEBUG_andy
    303             uPort = 8000; /** @todo BUGBUG Remove this! */
    304 #endif
    305302            rc = ShClTransferHttpServerCreateEx(pSrv, (uint32_t)uPort);
    306303            if (RT_SUCCESS(rc))
    307304            {
    308                 *puPort = uPort;
     305                if (puPort)
     306                    *puPort = uPort;
    309307                break;
    310308            }
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