Changeset 60517 in vbox for trunk/src/VBox/ValidationKit/utils/usb/UsbTestService.cpp
- Timestamp:
- Apr 15, 2016 12:20:51 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 106633
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/usb/UsbTestService.cpp
r60493 r60517 58 58 #include "UsbTestServiceInternal.h" 59 59 #include "UsbTestServiceGadget.h" 60 #include "UsbTestServicePlatform.h" 60 61 61 62 … … 1045 1046 if (RT_SUCCESS(rc)) 1046 1047 { 1047 rc = RTCritSectInit(&g_CritSectClients);1048 rc = utsPlatformInit(); 1048 1049 if (RT_SUCCESS(rc)) 1049 1050 { 1050 rc = RT PipeCreate(&g_hPipeR, &g_hPipeW, 0);1051 rc = RTCritSectInit(&g_CritSectClients); 1051 1052 if (RT_SUCCESS(rc)) 1052 1053 { 1053 /* Spin off the thread serving connections. */ 1054 rc = RTThreadCreate(&g_hThreadServing, utsClientWorker, NULL, 0, RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, 1055 "USBTSTSRV"); 1054 rc = RTPipeCreate(&g_hPipeR, &g_hPipeW, 0); 1056 1055 if (RT_SUCCESS(rc)) 1057 return VINF_SUCCESS; 1056 { 1057 /* Spin off the thread serving connections. */ 1058 rc = RTThreadCreate(&g_hThreadServing, utsClientWorker, NULL, 0, RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, 1059 "USBTSTSRV"); 1060 if (RT_SUCCESS(rc)) 1061 return VINF_SUCCESS; 1062 else 1063 RTMsgError("Creating the client worker thread failed with %Rrc\n", rc); 1064 1065 RTPipeClose(g_hPipeR); 1066 RTPipeClose(g_hPipeW); 1067 } 1058 1068 else 1059 RTMsgError("Creating the client worker thread failed with %Rrc\n", rc); 1060 1061 RTPipeClose(g_hPipeR); 1062 RTPipeClose(g_hPipeW); 1069 RTMsgError("Creating communications pipe failed with %Rrc\n", rc); 1070 1071 RTCritSectDelete(&g_CritSectClients); 1063 1072 } 1064 1073 else 1065 RTMsgError("Creating communications pipefailed with %Rrc\n", rc);1066 1067 RTCritSectDelete(&g_CritSectClients);1074 RTMsgError("Creating global critical section failed with %Rrc\n", rc); 1075 1076 utsConfigAstDestroy(g_pCfgAst); 1068 1077 } 1069 1078 else 1070 RTMsgError("Creating global critical section failed with %Rrc\n", rc);1071 1072 utsConfigAstDestroy(g_pCfgAst);1073 }1074 else1075 {1076 if (RTErrInfoIsSet(pErrInfo))1077 1079 { 1078 RTMsgError("Failed to parse config with detailed error: %s (%Rrc)\n", 1079 pErrInfo->pszMsg, pErrInfo->rc); 1080 RTErrInfoFree(pErrInfo); 1080 if (RTErrInfoIsSet(pErrInfo)) 1081 { 1082 RTMsgError("Failed to parse config with detailed error: %s (%Rrc)\n", 1083 pErrInfo->pszMsg, pErrInfo->rc); 1084 RTErrInfoFree(pErrInfo); 1085 } 1086 else 1087 RTMsgError("Faield to parse config with unknown error (%Rrc)\n", rc); 1088 return rc; 1081 1089 } 1082 else1083 RTMsgError("Faield to parse config with unknown error (%Rrc)\n", rc);1084 return rc;1085 1090 } 1086 1091 … … 1425 1430 g_pTransport->pfnTerm(); 1426 1431 1432 utsPlatformTerm(); 1433 1427 1434 return rcExit; 1428 1435 }
Note:
See TracChangeset
for help on using the changeset viewer.