Changeset 64166 in vbox for trunk/src/VBox/Main
- Timestamp:
- Oct 6, 2016 2:11:46 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 111147
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r64155 r64166 4967 4967 SafeArray<BSTR> pfs; 4968 4968 hrc = natEngine->COMGETTER(Redirects)(ComSafeArrayAsOutParam(pfs)); H(); 4969 PCFGMNODE pPF = NULL; /* /Devices/Dev/.../Config/PF#0/ */ 4969 4970 PCFGMNODE pPFTree = NULL; 4971 if (pfs.size() > 0) 4972 InsertConfigNode(pCfg, "PortForwarding", &pPFTree); 4973 4970 4974 for (unsigned int i = 0; i < pfs.size(); ++i) 4971 4975 { 4976 PCFGMNODE pPF = NULL; /* /Devices/Dev/.../Config/PortForwarding/$n/ */ 4977 4972 4978 uint16_t port = 0; 4973 4979 BSTR r = pfs[i]; … … 5018 5024 continue; 5019 5025 5020 if (strName.isEmpty())5021 VMSetError(VMR3GetVM(mpUVM), VERR_CFGM_NO_NODE, RT_SRC_POS, 5022 N_("NAT redirection rule without a name"));5023 5024 InsertConfigNode(pCfg, strName.c_str(), &pPF); 5026 InsertConfigNode(pPFTree, Utf8StrFmt("%u", i).c_str(), &pPF); 5027 5028 if (!strName.isEmpty()) 5029 InsertConfigString(pPF, "Name", strName); 5030 5025 5031 InsertConfigString(pPF, "Protocol", strProto); 5026 5032 -
trunk/src/VBox/Main/src-server/NATEngineImpl.cpp
r64142 r64166 275 275 tr("Whitespace in NAT rule name")); 276 276 277 if ( c == '/' /* CFGM node path separator */ 278 || c == ',') /* VBoxManage natpf<N> argument is csv */ 277 if (c == ',') /* we use csv in several places e.g. GetRedirects or natpf<N> argument */ 279 278 return setError(E_INVALIDARG, 280 279 tr("'%c' - invalid character in NAT rule name"), c);
Note:
See TracChangeset
for help on using the changeset viewer.