- Timestamp:
- May 3, 2016 3:16:13 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/NATNetworkImpl.cpp
r60786 r60805 115 115 HRESULT NATNetwork::init(VirtualBox *aVirtualBox, com::Utf8Str aName) 116 116 { 117 AssertReturn(!aName.isEmpty(), E_INVALIDARG);118 119 117 AutoInitSpan autoInitSpan(this); 120 118 AssertReturn(autoInitSpan.isOk(), E_FAIL); … … 170 168 171 169 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 170 AssertReturn(!m->s.strNetworkName.isEmpty(), E_FAIL); 172 171 data = m->s; 173 alock.release();174 172 175 173 m->pVirtualBox->i_onNATNetworkSetting(Bstr(m->s.strNetworkName).raw(), … … 201 199 HRESULT NATNetwork::getNetworkName(com::Utf8Str &aNetworkName) 202 200 { 201 AssertReturn(!m->s.strNetworkName.isEmpty(), E_FAIL); 203 202 aNetworkName = m->s.strNetworkName; 204 203 return S_OK; … … 207 206 HRESULT NATNetwork::setNetworkName(const com::Utf8Str &aNetworkName) 208 207 { 208 if (m->s.strNetworkName.isEmpty()) 209 return setError(E_INVALIDARG, 210 tr("Network name cannot be empty")); 209 211 { 210 212 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 645 647 #ifdef VBOX_WITH_NAT_SERVICE 646 648 if (!m->s.fEnabled) return S_OK; 649 AssertReturn(!m->s.strNetworkName.isEmpty(), E_FAIL); 647 650 648 651 m->NATRunner.setOption(NetworkServiceRunner::kNsrKeyNetwork, Utf8Str(m->s.strNetworkName).c_str());
Note:
See TracChangeset
for help on using the changeset viewer.