Changeset 43144 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Sep 1, 2012 2:44:48 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 80517
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r43138 r43144 1132 1132 { 1133 1133 CNetworkAdapter na = machine.GetNetworkAdapter(uAdapterIndex); 1134 if (na.GetEnabled() && 1135 (na.GetAttachmentType() == KNetworkAttachmentType_Bridged || 1136 na.GetAttachmentType() == KNetworkAttachmentType_HostOnly)) 1137 { 1138 QStringList ifNames; 1139 ifNames << na.GetBridgedInterface() 1140 << na.GetHostOnlyInterface(); 1141 1142 foreach (const QString &strIfName, ifNames) 1134 1135 if (na.GetEnabled()) 1136 { 1137 QString strIfName = QString(); 1138 1139 /* Get physical network interface name for currently 1140 * enabled network attachement type */ 1141 switch (na.GetAttachmentType()) 1143 1142 { 1144 if (!strIfName.isEmpty() && 1145 !QNetworkInterface::interfaceFromName(strIfName).isValid()) 1146 { 1147 LogFlow(("Found invalid network interface: %s\n", strIfName.toStdString().c_str())); 1148 failedInterfaceNames << QString("%1 (adapter %2)").arg(strIfName).arg(uAdapterIndex + 1); 1143 case KNetworkAttachmentType_Bridged: 1144 strIfName = na.GetBridgedInterface(); 1149 1145 break; 1150 } 1146 case KNetworkAttachmentType_HostOnly: 1147 strIfName = na.GetHostOnlyInterface(); 1148 break; 1151 1149 } 1152 } 1153 } 1154 /* Check failed? */ 1150 1151 if (!strIfName.isEmpty() && 1152 !QNetworkInterface::interfaceFromName(strIfName).isValid()) 1153 { 1154 LogFlow(("Found invalid network interface: %s\n", strIfName.toStdString().c_str())); 1155 failedInterfaceNames << QString("%1 (adapter %2)").arg(strIfName).arg(uAdapterIndex + 1); 1156 } 1157 } 1158 } 1159 1160 /* Check if non-existent interfaces found */ 1155 1161 if (!failedInterfaceNames.isEmpty()) 1156 1162 {
Note:
See TracChangeset
for help on using the changeset viewer.