The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipc/server: Add error messages for init failures

authored by

Jakob Bornecrantz and committed by
Moses Turner
c8ee075b 8c96cf4a

+9 -2
+9 -2
src/xrt/ipc/server/ipc_server_process.c
··· 411 411 // Yes we should be running. 412 412 s->running = true; 413 413 s->exit_on_disconnect = debug_get_bool_option_exit_on_disconnect(); 414 + s->ll = debug_get_log_option_ipc_log(); 414 415 415 416 int ret = xrt_instance_create(NULL, &s->xinst); 416 417 if (ret < 0) { 418 + IPC_ERROR(s, "Failed to create instance!"); 417 419 teardown_all(s); 418 420 return ret; 419 421 } ··· 421 423 struct xrt_device *xdevs[IPC_SERVER_NUM_XDEVS] = {0}; 422 424 ret = xrt_instance_select(s->xinst, xdevs, IPC_SERVER_NUM_XDEVS); 423 425 if (ret < 0) { 426 + IPC_ERROR(s, "Failed to select/create devices!"); 424 427 teardown_all(s); 425 428 return ret; 426 429 } ··· 437 440 438 441 // If we don't have a HMD shutdown. 439 442 if (s->idevs[0].xdev == NULL) { 443 + IPC_ERROR(s, "No HMD found!"); 440 444 teardown_all(s); 441 445 return -1; 442 446 } 443 447 444 448 ret = init_tracking_origins(s); 445 449 if (ret < 0) { 450 + IPC_ERROR(s, "Failed to init tracking origins!"); 446 451 teardown_all(s); 447 452 return -1; 448 453 } 449 454 450 455 ret = xrt_instance_create_system_compositor(s->xinst, s->idevs[0].xdev, &s->xsysc); 451 456 if (ret < 0) { 457 + IPC_ERROR(s, "Could not create system compositor!"); 452 458 teardown_all(s); 453 459 return ret; 454 460 } 455 461 456 462 ret = init_shm(s); 457 463 if (ret < 0) { 464 + IPC_ERROR(s, "Could not init shared memory!"); 458 465 teardown_all(s); 459 466 return ret; 460 467 } 461 468 462 469 ret = ipc_server_mainloop_init(&s->ml); 463 470 if (ret < 0) { 471 + IPC_ERROR(s, "Failed to init ipc main loop!"); 464 472 teardown_all(s); 465 473 return ret; 466 474 } 467 475 468 476 ret = os_mutex_init(&s->global_state.lock); 469 477 if (ret < 0) { 478 + IPC_ERROR(s, "Global state lock mutex failed to inti!"); 470 479 teardown_all(s); 471 480 return ret; 472 481 } 473 - 474 - s->ll = debug_get_log_option_ipc_log(); 475 482 476 483 u_var_add_root(s, "IPC Server", false); 477 484 u_var_add_ro_u32(s, &s->ll, "log level");