···808808809809 assert(icc->compositor_created);
810810811811- xret = ipc_call_session_destroy(icc->ipc_c);
812812-813813- /*
814814- * We are probably in a really bad state if we fail, at
815815- * least print out the error and continue as best we can.
816816- */
817817- IPC_CHK_ONLY_PRINT(icc->ipc_c, xret, "ipc_call_session_destroy");
818818-819819-820811 os_precise_sleeper_deinit(&icc->sleeper);
821812822813 icc->compositor_created = false;
···10181009 return XRT_ERROR_MULTI_SESSION_NOT_IMPLEMENTED;
10191010 }
1020101110211021- // Needs to be done before init.
10221022- xret = ipc_call_session_create(icc->ipc_c, xsi);
10121012+ /*
10131013+ * Needs to be done before init, we don't own the service side session
10141014+ * the session does. But we create it here in case any extra arguments
10151015+ * that only the compositor knows about needs to be sent.
10161016+ */
10171017+ xret = ipc_call_session_create( //
10181018+ icc->ipc_c, // ipc_c
10191019+ xsi, // xsi
10201020+ true); // create_native_compositor
10231021 IPC_CHK_AND_RET(icc->ipc_c, xret, "ipc_call_session_create");
1024102210251023 // Needs to be done after session create call.
+13
src/xrt/ipc/client/ipc_client_session.c
···6060ipc_client_session_destroy(struct xrt_session *xs)
6161{
6262 struct ipc_client_session *ics = ipc_session(xs);
6363+ xrt_result_t xret;
6464+6565+ /*
6666+ * We own the session in both cases of headless or created with a
6767+ * native compositor, so we need to destroy it.
6868+ */
6969+ xret = ipc_call_session_destroy(ics->ipc_c);
7070+7171+ /*
7272+ * We are probably in a really bad state if we fail, at
7373+ * least print out the error and continue as best we can.
7474+ */
7575+ IPC_CHK_ONLY_PRINT(ics->ipc_c, xret, "ipc_call_session_destroy");
63766477 free(ics);
6578}