Changeset 39430 in vbox
- Timestamp:
- Nov 28, 2011 8:25:42 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/debug.c
r39363 r39430 324 324 uint32_t u32SocketState = (uint32_t)(uintptr_t)pvValue; 325 325 int idxNATState = 0; 326 bool fFirst = true; 327 size_t cbReturn = 0; 326 328 NOREF(cchWidth); 327 329 NOREF(cchPrecision); … … 332 334 for (idxNATState = 0; idxNATState < RT_ELEMENTS(g_apszSocketStates); ++idxNATState) 333 335 { 334 if (u32SocketState == g_apszSocketStates[idxNATState].u32SocketState) 335 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, g_apszSocketStates[idxNATState].pcszSocketStateName); 336 } 337 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "[unknown state %RX32]", u32SocketState); 336 if (u32SocketState & g_apszSocketStates[idxNATState].u32SocketState) 337 { 338 if (fFirst) 339 { 340 cbReturn += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, g_apszSocketStates[idxNATState].pcszSocketStateName); 341 fFirst = false; 342 } 343 else 344 cbReturn += RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "|%s", g_apszSocketStates[idxNATState].pcszSocketStateName); 345 } 346 } 347 348 if (!cbReturn) 349 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "[unknown state %RX32]", u32SocketState); 350 351 return cbReturn; 338 352 } 339 353
Note:
See TracChangeset
for help on using the changeset viewer.