VirtualBox

Ignore:
Timestamp:
Dec 13, 2010 11:36:38 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
68815
Message:

Main/NATEngine: return proper error info if a NAT rule cannot be registered

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/NATEngineImpl.cpp

    r33952 r34992  
    287287    {
    288288        r = it->second;
    289         if (   it->first == name
    290             || (   r.strHostIP == Utf8Str(aBindIp)
    291                 && r.u16HostPort == aHostPort))
    292         {
    293             return E_INVALIDARG;
    294         }
     289        if (it->first == name)
     290            return setError(E_INVALIDARG,
     291                            tr("A NAT rule of this name does already exist"));
     292        if (   r.strHostIP == Utf8Str(aBindIp)
     293            && r.u16HostPort == aHostPort)
     294            return setError(E_INVALIDARG,
     295                            tr("A NAT rule for this host port and this host IP does already exist"));
    295296    }
    296297
Note: See TracChangeset for help on using the changeset viewer.

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