- Timestamp:
- Jul 18, 2011 1:24:08 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSB-solaris.c
r38016 r38017 286 286 int fPoll; /* Polling status flag */ 287 287 RTPROCESS Process; /* The process (id) of the session */ 288 bool fInstanceOpen; /* If the process is still holding this instance */289 288 VBOXUSBREQ_CLIENT_INFO ClientInfo; /* Registration data */ 290 289 vboxusb_power_t *pPower; /* Power Management */ … … 481 480 pState->fPoll = VBOXUSB_POLL_OFF; 482 481 pState->Process = NIL_RTPROCESS; 483 pState->fInstanceOpen = false;484 482 pState->pPower = NULL; 485 483 … … 848 846 mutex_enter(&pState->Mtx); 849 847 850 if (pState-> fInstanceOpen == false)848 if (pState->Process == NIL_RTPROCESS) 851 849 pState->Process = Process; 852 850 else … … 888 886 * Only one user process can open a device instance at a time. 889 887 */ 890 if (pState->fInstanceOpen == true)891 {892 LogRel((DEVICE_NAME ":VBoxUSBSolarisOpen a process is already using this device instance.\n"));893 return EBUSY;894 }895 896 888 if (pState->Process != RTProcSelf()) 897 889 { 898 LogRel((DEVICE_NAME ":VBoxUSBSolarisOpen invalid process.\n")); 890 if (pState->Process == NIL_RTPROCESS) 891 LogRel((DEVICE_NAME ":VBoxUSBSolarisOpen No prior information about authorized process.\n")); 892 else 893 LogRel((DEVICE_NAME ":VBoxUSBSolarisOpen Process %d is already using this device instance.\n", pState->Process)); 894 895 mutex_exit(&pState->Mtx); 899 896 return EPERM; 900 897 } 901 898 902 899 pState->fPoll = VBOXUSB_POLL_ON; 903 pState->fInstanceOpen = true;904 900 905 901 mutex_exit(&pState->Mtx); … … 927 923 pState->fPoll = VBOXUSB_POLL_OFF; 928 924 pState->Process = NIL_RTPROCESS; 929 pState->fInstanceOpen = false;930 925 mutex_exit(&pState->Mtx); 931 926
Note:
See TracChangeset
for help on using the changeset viewer.