mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
ipc: Check return of ipc_call_space_create_semantic_ids
This commit is contained in:
parent
331b5b480e
commit
88cf637e95
|
@ -196,6 +196,24 @@ destroy(struct xrt_space_overseer *xso)
|
||||||
struct xrt_space_overseer *
|
struct xrt_space_overseer *
|
||||||
ipc_client_space_overseer_create(struct ipc_connection *ipc_c)
|
ipc_client_space_overseer_create(struct ipc_connection *ipc_c)
|
||||||
{
|
{
|
||||||
|
uint32_t root_id = UINT32_MAX;
|
||||||
|
uint32_t view_id = UINT32_MAX;
|
||||||
|
uint32_t local_id = UINT32_MAX;
|
||||||
|
uint32_t local_floor_id = UINT32_MAX;
|
||||||
|
uint32_t stage_id = UINT32_MAX;
|
||||||
|
uint32_t unbounded_id = UINT32_MAX;
|
||||||
|
xrt_result_t xret;
|
||||||
|
|
||||||
|
xret = ipc_call_space_create_semantic_ids( //
|
||||||
|
ipc_c, //
|
||||||
|
&root_id, //
|
||||||
|
&view_id, //
|
||||||
|
&local_id, //
|
||||||
|
&local_floor_id, //
|
||||||
|
&stage_id, //
|
||||||
|
&unbounded_id); //
|
||||||
|
IPC_CHK_WITH_RET(ipc_c, xret, "ipc_call_space_create_semantic_ids", NULL);
|
||||||
|
|
||||||
struct ipc_client_space_overseer *icspo = U_TYPED_CALLOC(struct ipc_client_space_overseer);
|
struct ipc_client_space_overseer *icspo = U_TYPED_CALLOC(struct ipc_client_space_overseer);
|
||||||
icspo->base.create_offset_space = create_offset_space;
|
icspo->base.create_offset_space = create_offset_space;
|
||||||
icspo->base.create_pose_space = create_pose_space;
|
icspo->base.create_pose_space = create_pose_space;
|
||||||
|
@ -204,22 +222,6 @@ ipc_client_space_overseer_create(struct ipc_connection *ipc_c)
|
||||||
icspo->base.destroy = destroy;
|
icspo->base.destroy = destroy;
|
||||||
icspo->ipc_c = ipc_c;
|
icspo->ipc_c = ipc_c;
|
||||||
|
|
||||||
uint32_t root_id = UINT32_MAX;
|
|
||||||
uint32_t view_id = UINT32_MAX;
|
|
||||||
uint32_t local_id = UINT32_MAX;
|
|
||||||
uint32_t local_floor_id = UINT32_MAX;
|
|
||||||
uint32_t stage_id = UINT32_MAX;
|
|
||||||
uint32_t unbounded_id = UINT32_MAX;
|
|
||||||
|
|
||||||
ipc_call_space_create_semantic_ids( //
|
|
||||||
icspo->ipc_c, //
|
|
||||||
&root_id, //
|
|
||||||
&view_id, //
|
|
||||||
&local_id, //
|
|
||||||
&local_floor_id, //
|
|
||||||
&stage_id, //
|
|
||||||
&unbounded_id); //
|
|
||||||
|
|
||||||
#define CREATE(NAME) \
|
#define CREATE(NAME) \
|
||||||
do { \
|
do { \
|
||||||
if (NAME##_id == UINT32_MAX) { \
|
if (NAME##_id == UINT32_MAX) { \
|
||||||
|
|
Loading…
Reference in a new issue