Changeset 41174 in vbox for trunk/src/VBox/Main/src-server/generic
- Timestamp:
- May 4, 2012 5:02:07 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77794
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/generic/NetIf-generic.cpp
r39429 r41174 166 166 else 167 167 strcat(szAdpCtl, "add"); 168 if (strlen(szAdpCtl) < RTPATH_MAX - sizeof(" 2>&1")) 169 strcat(szAdpCtl, " 2>&1"); 168 170 FILE *fp = popen(szAdpCtl, "r"); 169 171 170 172 if (fp) 171 173 { 172 char szBuf[ VBOXNET_MAX_SHORT_NAME];174 char szBuf[128]; /* We are not interested in long error messages. */ 173 175 if (fgets(szBuf, sizeof(szBuf), fp)) 174 176 { 177 if (!strncmp(VBOXNETADPCTL_NAME ":", szBuf, sizeof(VBOXNETADPCTL_NAME))) 178 { 179 progress->notifyComplete(E_FAIL, 180 COM_IIDOF(IHostNetworkInterface), 181 HostNetworkInterface::getStaticComponentName(), 182 "%s", szBuf); 183 return E_FAIL; 184 } 175 185 char *pLast = szBuf + strlen(szBuf) - 1; 176 186 if (pLast >= szBuf && *pLast == '\n')
Note:
See TracChangeset
for help on using the changeset viewer.