Changeset 94965 in vbox
- Timestamp:
- May 9, 2022 3:03:17 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/RemoteUSBBackend.cpp
r93115 r94965 125 125 static void requestDevice(REMOTEUSBDEVICE *pDevice) 126 126 { 127 int rc = RTCritSectEnter(&pDevice->critsect);128 AssertRC( rc);127 int vrc = RTCritSectEnter(&pDevice->critsect); 128 AssertRC(vrc); 129 129 } 130 130 … … 158 158 { 159 159 RT_NOREF(u32ClientId); 160 int rc = VINF_SUCCESS;160 int vrc = VINF_SUCCESS; 161 161 162 162 LogFlow(("USBClientResponseCallback: id = %d, pv = %p, code = %d, pvRet = %p, cbRet = %d\n", … … 169 169 case VRDE_USB_REQ_DEVICE_LIST: 170 170 { 171 rc = pThis->saveDeviceList(pvRet, cbRet);171 vrc = pThis->saveDeviceList(pvRet, cbRet); 172 172 } break; 173 173 … … 178 178 VRDEUSBREQNEGOTIATERET *pret = (VRDEUSBREQNEGOTIATERET *)pvRet; 179 179 180 rc = pThis->negotiateResponse(pret, cbRet);180 vrc = pThis->negotiateResponse(pret, cbRet); 181 181 } 182 182 else … … 185 185 pvRet, cbRet, sizeof(VRDEUSBREQNEGOTIATERET))); 186 186 187 rc = VERR_INVALID_PARAMETER;187 vrc = VERR_INVALID_PARAMETER; 188 188 } 189 189 } break; … … 191 191 case VRDE_USB_REQ_REAP_URB: 192 192 { 193 rc = pThis->reapURB(pvRet, cbRet);194 195 LogFlow(("USBClientResponseCallback: reap URB, rc = %Rrc.\n", rc));193 vrc = pThis->reapURB(pvRet, cbRet); 194 195 LogFlow(("USBClientResponseCallback: reap URB, rc = %Rrc.\n", vrc)); 196 196 } break; 197 197 … … 226 226 { 227 227 Log(("USBClientResponseCallback: WARNING: invalid device id %08X.\n", pret->id)); 228 rc = VERR_INVALID_PARAMETER;228 vrc = VERR_INVALID_PARAMETER; 229 229 } 230 230 else … … 248 248 } 249 249 250 return rc;250 return vrc; 251 251 } 252 252 … … 258 258 { 259 259 RT_NOREF(cbAddress); 260 int rc = VINF_SUCCESS;260 int vrc = VINF_SUCCESS; 261 261 262 262 RemoteUSBBackend *pThis = (RemoteUSBBackend *)pInstance; … … 266 266 if (!pDevice) 267 267 { 268 rc = VERR_NO_MEMORY;268 vrc = VERR_NO_MEMORY; 269 269 } 270 270 else … … 277 277 { 278 278 AssertFailed(); 279 rc = VERR_INVALID_PARAMETER;279 vrc = VERR_INVALID_PARAMETER; 280 280 } 281 281 else … … 285 285 pDevice->fWokenUp = false; 286 286 287 rc = RTCritSectInit(&pDevice->critsect);288 AssertRC( rc);289 290 if (RT_SUCCESS( rc))287 vrc = RTCritSectInit(&pDevice->critsect); 288 AssertRC(vrc); 289 290 if (RT_SUCCESS(vrc)) 291 291 { 292 292 pDevice->id = RTStrToUInt32(&pszAddress[REMOTE_USB_BACKEND_PREFIX_LEN]); … … 304 304 { 305 305 AssertFailed(); 306 rc = VERR_INVALID_PARAMETER;306 vrc = VERR_INVALID_PARAMETER; 307 307 } 308 308 } … … 310 310 { 311 311 AssertFailed(); 312 rc = VERR_INVALID_PARAMETER;312 vrc = VERR_INVALID_PARAMETER; 313 313 } 314 314 315 if (RT_SUCCESS( rc))315 if (RT_SUCCESS(vrc)) 316 316 { 317 317 VRDE_USB_REQ_OPEN_PARM parm; … … 326 326 } 327 327 328 if (RT_SUCCESS( rc))328 if (RT_SUCCESS(vrc)) 329 329 { 330 330 *ppDevice = pDevice; … … 337 337 } 338 338 339 return rc;339 return vrc; 340 340 } 341 341 … … 529 529 uint32_t u32Len, void *pvData, void *pvURB, PREMOTEUSBQURB *ppRemoteURB) 530 530 { 531 int rc = VINF_SUCCESS;531 int vrc = VINF_SUCCESS; 532 532 533 533 #ifdef DEBUG_sunlover … … 551 551 if (qurb == NULL) 552 552 { 553 rc = VERR_NO_MEMORY;553 vrc = VERR_NO_MEMORY; 554 554 goto l_leave; 555 555 } … … 577 577 { 578 578 AssertFailed(); 579 rc = VERR_INVALID_PARAMETER;579 vrc = VERR_INVALID_PARAMETER; 580 580 goto l_leave; 581 581 } … … 602 602 case VUSBXFERTYPE_INTR: parm.type = VRDE_USB_TRANSFER_TYPE_INTR; break; 603 603 case VUSBXFERTYPE_MSG: parm.type = VRDE_USB_TRANSFER_TYPE_MSG; break; 604 default: AssertFailed(); rc = VERR_INVALID_PARAMETER; goto l_leave;604 default: AssertFailed(); vrc = VERR_INVALID_PARAMETER; goto l_leave; 605 605 } 606 606 … … 612 612 case VUSB_DIRECTION_IN: parm.direction = VRDE_USB_DIRECTION_IN; break; 613 613 case VUSB_DIRECTION_OUT: parm.direction = VRDE_USB_DIRECTION_OUT; break; 614 default: AssertFailed(); rc = VERR_INVALID_PARAMETER; goto l_leave;614 default: AssertFailed(); vrc = VERR_INVALID_PARAMETER; goto l_leave; 615 615 } 616 616 … … 658 658 659 659 l_leave: 660 if (RT_FAILURE( rc))660 if (RT_FAILURE(vrc)) 661 661 { 662 662 qurbFree(qurb); 663 663 } 664 664 665 return rc;665 return vrc; 666 666 } 667 667 … … 672 672 uint32_t *pu32Len, uint32_t *pu32Err) 673 673 { 674 int rc = VINF_SUCCESS;674 int vrc = VINF_SUCCESS; 675 675 676 676 LogFlow(("RemoteUSBBackend::iface_ReapURB %d ms\n", u32Millies)); … … 794 794 } 795 795 796 return rc;796 return vrc; 797 797 } 798 798 … … 976 976 Assert(server); 977 977 978 int rc = RTCritSectInit(&mCritsect);979 980 if (RT_FAILURE( rc))978 int vrc = RTCritSectInit(&mCritsect); 979 980 if (RT_FAILURE(vrc)) 981 981 { 982 982 AssertFailed(); … … 1015 1015 int RemoteUSBBackend::negotiateResponse(const VRDEUSBREQNEGOTIATERET *pret, uint32_t cbRet) 1016 1016 { 1017 int rc = VINF_SUCCESS;1017 int vrc = VINF_SUCCESS; 1018 1018 1019 1019 Log(("RemoteUSBBackend::negotiateResponse: flags = %02X.\n", pret->flags)); … … 1048 1048 { 1049 1049 LogRel(("VRDP: ERROR: unsupported remote USB protocol client version %d.\n", pret2->u32Version)); 1050 rc = VERR_NOT_SUPPORTED;1050 vrc = VERR_NOT_SUPPORTED; 1051 1051 } 1052 1052 } … … 1054 1054 { 1055 1055 LogRel(("VRDP: ERROR: invalid remote USB negotiate request packet size %d.\n", cbRet)); 1056 rc = VERR_NOT_SUPPORTED;1056 vrc = VERR_NOT_SUPPORTED; 1057 1057 } 1058 1058 } … … 1063 1063 } 1064 1064 1065 if (RT_SUCCESS( rc))1065 if (RT_SUCCESS(vrc)) 1066 1066 { 1067 1067 LogRel(("VRDP: remote USB protocol version %d.\n", mClientVersion)); … … 1079 1079 { 1080 1080 LogRel(("VRDP: ERROR: invalid remote USB negotiate request packet size %d.\n", cbRet)); 1081 rc = VERR_NOT_SUPPORTED;1081 vrc = VERR_NOT_SUPPORTED; 1082 1082 } 1083 1083 } … … 1086 1086 } 1087 1087 1088 return rc;1088 return vrc; 1089 1089 } 1090 1090 … … 1114 1114 void RemoteUSBBackend::request(void) 1115 1115 { 1116 int rc = RTCritSectEnter(&mCritsect);1117 AssertRC( rc);1116 int vrc = RTCritSectEnter(&mCritsect); 1117 AssertRC(vrc); 1118 1118 } 1119 1119 … … 1178 1178 int RemoteUSBBackend::reapURB(const void *pvBody, uint32_t cbBody) 1179 1179 { 1180 int rc = VINF_SUCCESS;1180 int vrc = VINF_SUCCESS; 1181 1181 1182 1182 LogFlow(("RemoteUSBBackend::reapURB: pvBody = %p, cbBody = %d\n", pvBody, cbBody)); … … 1206 1206 { 1207 1207 LogFlow(("RemoteUSBBackend::reapURB: WARNING: invalid reply data. Skipping the reply.\n")); 1208 rc = VERR_INVALID_PARAMETER;1208 vrc = VERR_INVALID_PARAMETER; 1209 1209 break; 1210 1210 } … … 1215 1215 { 1216 1216 LogFlow(("RemoteUSBBackend::reapURB: WARNING: invalid device id. Skipping the reply.\n")); 1217 rc = VERR_INVALID_PARAMETER;1217 vrc = VERR_INVALID_PARAMETER; 1218 1218 break; 1219 1219 } … … 1385 1385 if (cbBodySize > cbBody) 1386 1386 { 1387 rc = VERR_INVALID_PARAMETER;1387 vrc = VERR_INVALID_PARAMETER; 1388 1388 break; 1389 1389 } … … 1393 1393 } 1394 1394 1395 LogFlow(("RemoteUSBBackend::reapURB: returns %Rrc\n", rc));1396 1397 return rc;1395 LogFlow(("RemoteUSBBackend::reapURB: returns %Rrc\n", vrc)); 1396 1397 return vrc; 1398 1398 } 1399 1399 /* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note:
See TracChangeset
for help on using the changeset viewer.