- Timestamp:
- Aug 2, 2008 6:37:43 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r11063 r11076 1202 1202 } 1203 1203 /* The name is on the form 'ifX: long name', chop it off at the colon. */ 1204 Bstr hostInterfaceName; 1205 hrc = networkAdapter->COMGETTER(HostInterface)(hostInterfaceName.asOutParam()); H(); 1204 Bstr HifName; 1205 hrc = networkAdapter->COMGETTER(HostInterface)(HifName.asOutParam()); H(); 1206 Utf8Str HifNameUtf8(HifName); 1207 const char *pszHifName = HifNameUtf8.raw(); 1206 1208 char szTrunk[8]; 1207 strncpy(szTrunk, Utf8Str(hostInterfaceName).raw(), sizeof(szTrunk));1209 strncpy(szTrunk, pszHifName, sizeof(szTrunk)); 1208 1210 char *pszColon = (char *)memchr(szTrunk, ':', sizeof(szTrunk)); 1209 1211 if (!pszColon) … … 1212 1214 return VMSetError(pVM, VERR_INTERNAL_ERROR, RT_SRC_POS, 1213 1215 N_("Malformed host interface networking name '%ls'"), 1214 hostInterfaceName.raw());1216 HifName.raw()); 1215 1217 } 1216 1218 *pszColon = '\0'; … … 1223 1225 RTStrPrintf(szNetwork, sizeof(szNetwork), "HostInterfaceNetworking-%s\n", szTrunk); 1224 1226 rc = CFGMR3InsertString(pCfg, "Network", szNetwork); RC_CHECK(); 1227 /** @todo Come up with a better deal here. Problem is that IHostNetworkInterface is completely useless here. */ 1228 if ( strstr(pszHifName, "Wireless") 1229 || strstr(pszHifName, "AirPort" )) 1230 { 1231 rc = CFGMR3InsertInteger(pCfg, "SharedMacOnWire", true); RC_CHECK(); 1232 } 1225 1233 1226 1234 #elif defined(RT_OS_WINDOWS)
Note:
See TracChangeset
for help on using the changeset viewer.