Changeset 43994 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Nov 29, 2012 8:58:17 AM (12 years ago)
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/Performance.cpp
r43958 r43994 716 716 { 717 717 LogFlowThisFunc(("Check cable for %s! speed=%llu period=%d.\n", mShortName.c_str(), mSpeed, getPeriod())); 718 /* We do not collect host network metrics for unplugged interfaces! 718 719 mRx->put(0); 719 720 mTx->put(0); 721 */ 720 722 } 721 723 else -
trunk/src/VBox/Main/src-server/linux/NetIf-linux.cpp
r43668 r43994 170 170 fclose(fp); 171 171 } 172 if (pInfo->uSpeedMbits == 10) 173 { 174 /* Check the cable is plugged in at all */ 175 unsigned uCarrier = 0; 176 RTStrPrintf(szBuf, sizeof(szBuf), "/sys/class/net/%s/carrier", pszName); 177 fp = fopen(szBuf, "r"); 178 if (fp) 179 { 180 if (fscanf(fp, "%u", &uCarrier) != 1 || uCarrier == 0) 181 pInfo->uSpeedMbits = 0; 182 fclose(fp); 183 } 184 } 185 172 186 if (pInfo->uSpeedMbits == 0) 173 187 {
Note:
See TracChangeset
for help on using the changeset viewer.