Changeset 33988 in vbox for trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
- Timestamp:
- Nov 11, 2010 1:03:17 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
r33929 r33988 35 35 #include "cr_threads.h" 36 36 #include "net_internals.h" 37 #include "cr_process.h" 37 38 38 39 #include <iprt/thread.h> … … 1250 1251 } 1251 1252 1253 static int crVBoxHGCMSetPID(CRConnection *conn, CRpid pid) 1254 { 1255 CRVBOXHGCMSETPID parms; 1256 int rc; 1257 1258 parms.hdr.result = VERR_WRONG_ORDER; 1259 parms.hdr.u32ClientID = conn->u32ClientID; 1260 parms.hdr.u32Function = SHCRGL_GUEST_FN_SET_PID; 1261 parms.hdr.cParms = SHCRGL_CPARMS_SET_PID; 1262 1263 parms.u64PID.type = VMMDevHGCMParmType_64bit; 1264 parms.u64PID.u.value64 = (uintptr_t) pid; 1265 1266 rc = crVBoxHGCMCall(&parms, sizeof(parms)); 1267 1268 if (RT_FAILURE(rc) || RT_FAILURE(parms.hdr.result)) 1269 { 1270 Assert(0); 1271 1272 crWarning("SHCRGL_GUEST_FN_SET_PID failed!"); 1273 return FALSE; 1274 } 1275 1276 return TRUE; 1277 } 1278 1252 1279 /** 1253 1280 * The function that actually connects. This should only be called by clients, … … 1322 1349 if (ioctl(g_crvboxhgcm.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CONNECT, &Hdr) >= 0) 1323 1350 #else 1324 /*@todo it'd fail */1325 1351 if (ioctl(g_crvboxhgcm.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CONNECT, &info, sizeof (info)) >= 0) 1326 1352 #endif … … 1328 1354 if (info.result == VINF_SUCCESS) 1329 1355 { 1356 int rc; 1330 1357 conn->u32ClientID = info.u32ClientID; 1331 1358 crDebug("HGCM connect was successful: client id =0x%x\n", conn->u32ClientID); 1332 1359 1360 rc = crVBoxHGCMSetVersion(conn, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR); 1361 if (!rc) 1362 { 1363 return rc; 1364 } 1365 rc = crVBoxHGCMSetPID(conn, crGetPID()); 1333 1366 VBOXCRHGSMIPROFILE_FUNC_EPILOGUE(); 1334 return crVBoxHGCMSetVersion(conn, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR);1367 return rc; 1335 1368 } 1336 1369 else
Note:
See TracChangeset
for help on using the changeset viewer.