VirtualBox

Changeset 53344 in vbox for trunk


Ignore:
Timestamp:
Nov 18, 2014 9:14:50 AM (10 years ago)
Author:
vboxsync
Message:

Main: VRDEServer property TCP/Ports should accept 0 as default value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp

    r52959 r53344  
    376376    if (FAILED(adep.rc())) return adep.rc();
    377377
    378     Bstr key = aKey;
    379 
    380378    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    381379
    382380    /* Special processing for some "standard" properties. */
    383     if (key == Bstr("TCP/Ports"))
    384     {
    385         /* Verify the string. */
    386         int vrc = i_vrdpServerVerifyPortsString(aValue);
     381    if (aKey == "TCP/Ports")
     382    {
     383        /* Verify the string. "0" means the default port. */
     384        Utf8Str strPorts = aValue == "0"?
     385                               VRDP_DEFAULT_PORT_STR:
     386                               aValue;
     387        int vrc = i_vrdpServerVerifyPortsString(strPorts);
    387388        if (RT_FAILURE(vrc))
    388389            return E_INVALIDARG;
    389390
    390         if (aValue != mData->mProperties["TCP/Ports"])
     391        if (strPorts != mData->mProperties["TCP/Ports"])
    391392        {
    392393            /* Port value is not verified here because it is up to VRDP transport to
     
    395396             */
    396397            mData.backup();
    397             if (aValue == Utf8Str("0"))
    398                 mData->mProperties["TCP/Ports"] = VRDP_DEFAULT_PORT_STR;
    399             else
    400                 mData->mProperties["TCP/Ports"] = aValue;
     398            mData->mProperties["TCP/Ports"] = strPorts;
    401399
    402400            /* leave the lock before informing callbacks */
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