Changeset 50827 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserver
- Timestamp:
- Mar 19, 2014 4:57:33 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp
r50812 r50827 45 45 static uint32_t g_u32ScreenCount = 0; 46 46 static PVM g_pVM = NULL; 47 static uint32_t g_u32fCrHgcmDisabled = 0; 47 48 48 49 #ifndef RT_OS_WINDOWS … … 558 559 559 560 NOREF(pvClient); 561 562 if (g_u32fCrHgcmDisabled) 563 { 564 WARN(("cr hgcm disabled!")); 565 return; 566 } 560 567 561 568 Log(("SHARED_CROPENGL svcCall: u32ClientID = %d, fn = %d, cParms = %d, pparms = %d\n", u32ClientID, u32Function, cParms, paParms)); … … 1519 1526 if (paParms->u.pointer.size != sizeof (VBOXCRCMDCTL)) 1520 1527 WARN(("invalid param size")); 1521 return crVBoxServerHgcmDisable(); 1528 int rc = crVBoxServerHgcmDisable(); 1529 if (RT_SUCCESS(rc)) 1530 g_u32fCrHgcmDisabled = 1; 1531 else 1532 WARN(("crVBoxServerHgcmDisable failed %d", rc)); 1533 return rc; 1522 1534 } 1523 1535 case VBOXCRCMDCTL_TYPE_ENABLE: … … 1526 1538 WARN(("invalid param size")); 1527 1539 VBOXCRCMDCTL_ENABLE *pEnable = (VBOXCRCMDCTL_ENABLE*)pCtl; 1528 return crVBoxServerHgcmEnable(pEnable->hRHCmd, pEnable->pfnRHCmd); 1540 int rc = crVBoxServerHgcmEnable(pEnable->hRHCmd, pEnable->pfnRHCmd); 1541 if (RT_SUCCESS(rc)) 1542 g_u32fCrHgcmDisabled = 0; 1543 else 1544 WARN(("crVBoxServerHgcmEnable failed %d", rc)); 1545 return rc; 1529 1546 } 1530 1547 default: … … 1536 1553 } 1537 1554 default: 1555 if (g_u32fCrHgcmDisabled) 1556 { 1557 WARN(("cr hgcm disabled!")); 1558 return VERR_INVALID_STATE; 1559 } 1538 1560 return svcHostCallPerform(u32Function, cParms, paParms); 1539 1561 } … … 1562 1584 { 1563 1585 g_pHelpers = ptable->pHelpers; 1586 1587 g_u32fCrHgcmDisabled = 0; 1564 1588 1565 1589 ptable->cbClient = sizeof (void*);
Note:
See TracChangeset
for help on using the changeset viewer.