Changeset 60488 in vbox for trunk/src/VBox/ValidationKit/utils/usb/UsbTestService.cpp
- Timestamp:
- Apr 14, 2016 10:33:11 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 106590
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/usb/UsbTestService.cpp
r60417 r60488 462 462 463 463 return utsReplyFailure(pClient, pPktHdr, "FAILED ", rcOperation, "%s failed with rc=%Rrc (opcode '%.8s')", 464 rcOperation,szOperation, rcOperation, pPktHdr->achOpcode);464 szOperation, rcOperation, pPktHdr->achOpcode); 465 465 } 466 466 … … 600 600 601 601 /* Extract string. */ 602 pClient->pszHostname = RTStrDup( pClient->pszHostname);602 pClient->pszHostname = RTStrDup(&pReq->achHostname[0]); 603 603 if (!pClient->pszHostname) 604 return utsReplyRC(pClient, pPktHdr, VERR_NO_MEMORY, "Failed to all locate memory for the hostname string");604 return utsReplyRC(pClient, pPktHdr, VERR_NO_MEMORY, "Failed to allocate memory for the hostname string"); 605 605 606 606 if (pReq->fUsbConn & UTSPKT_HOWDY_CONN_F_PHYSICAL) … … 897 897 898 898 uint8_t bRead; 899 rc = RTPipeRead(g_hPipeR, &bRead, 1, NULL); 899 size_t cbRead = 0; 900 rc = RTPipeRead(g_hPipeR, &bRead, 1, &cbRead); 900 901 AssertRC(rc); 901 902 … … 950 951 /* Client sends a request, pick the right client and process it. */ 951 952 PUTSCLIENT pClient = papClients[uId - 1]; 953 AssertPtr(pClient); 952 954 if (fEvts & RTPOLL_EVT_READ) 953 955 rc = utsClientReqProcess(pClient); … … 957 959 { 958 960 /* Close connection and remove client from array. */ 961 rc = g_pTransport->pfnPollSetRemove(hPollSet, pClient->pTransportClient, uId); 962 AssertRC(rc); 963 959 964 g_pTransport->pfnNotifyBye(pClient->pTransportClient); 960 965 papClients[uId - 1] = NULL; … … 995 1000 * the request handling thread. 996 1001 */ 997 PUTSCLIENT pClient = (PUTSCLIENT)RTMemAllocZ(sizeof( PUTSCLIENT));1002 PUTSCLIENT pClient = (PUTSCLIENT)RTMemAllocZ(sizeof(UTSCLIENT)); 998 1003 if (RT_LIKELY(pClient)) 999 1004 { … … 1003 1008 pClient->hGadgetHost = NIL_UTSGADGETHOST; 1004 1009 pClient->hGadget = NIL_UTSGADGET; 1010 1011 /* Add client to the new list and inform the worker thread. */ 1012 RTCritSectEnter(&g_CritSectClients); 1013 RTListAppend(&g_LstClientsNew, &pClient->NdLst); 1014 RTCritSectLeave(&g_CritSectClients); 1015 1016 size_t cbWritten = 0; 1017 rc = RTPipeWrite(g_hPipeW, "", 1, &cbWritten); 1018 if (RT_FAILURE(rc)) 1019 RTMsgError("Failed to inform worker thread of a new client"); 1005 1020 } 1006 1021 else
Note:
See TracChangeset
for help on using the changeset viewer.