mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-14 17:50:06 +00:00
ipc: Use message channel's log_level in client
This commit is contained in:
parent
2d7041c797
commit
4a8400538c
src/xrt/ipc/client
|
@ -29,11 +29,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define IPC_TRACE(d, ...) U_LOG_IFL_T(d->log_level, __VA_ARGS__)
|
||||
#define IPC_DEBUG(d, ...) U_LOG_IFL_D(d->log_level, __VA_ARGS__)
|
||||
#define IPC_INFO(d, ...) U_LOG_IFL_I(d->log_level, __VA_ARGS__)
|
||||
#define IPC_WARN(d, ...) U_LOG_IFL_W(d->log_level, __VA_ARGS__)
|
||||
#define IPC_ERROR(d, ...) U_LOG_IFL_E(d->log_level, __VA_ARGS__)
|
||||
#define IPC_TRACE(IPC_C, ...) U_LOG_IFL_T((IPC_C)->imc.log_level, __VA_ARGS__)
|
||||
#define IPC_DEBUG(IPC_C, ...) U_LOG_IFL_D((IPC_C)->imc.log_level, __VA_ARGS__)
|
||||
#define IPC_INFO(IPC_C, ...) U_LOG_IFL_I((IPC_C)->imc.log_level, __VA_ARGS__)
|
||||
#define IPC_WARN(IPC_C, ...) U_LOG_IFL_W((IPC_C)->imc.log_level, __VA_ARGS__)
|
||||
#define IPC_ERROR(IPC_C, ...) U_LOG_IFL_E((IPC_C)->imc.log_level, __VA_ARGS__)
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -59,8 +59,6 @@ struct ipc_connection
|
|||
#ifdef XRT_OS_ANDROID
|
||||
struct ipc_client_android *ica;
|
||||
#endif // XRT_OS_ANDROID
|
||||
|
||||
enum u_logging_level log_level;
|
||||
};
|
||||
|
||||
/*!
|
||||
|
|
|
@ -82,8 +82,8 @@ ipc_client_socket_connect(struct ipc_connection *ipc_c)
|
|||
return false;
|
||||
}
|
||||
|
||||
// Set socket.
|
||||
ipc_c->imc.ipc_handle = socket;
|
||||
ipc_c->imc.log_level = ipc_c->log_level;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -196,8 +196,9 @@ ipc_client_socket_connect(struct ipc_connection *ipc_c)
|
|||
return false;
|
||||
}
|
||||
|
||||
// Set socket.
|
||||
ipc_c->imc.ipc_handle = pipe_inst;
|
||||
ipc_c->imc.log_level = ipc_c->log_level;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -239,8 +240,8 @@ ipc_client_socket_connect(struct ipc_connection *ipc_c)
|
|||
return false;
|
||||
}
|
||||
|
||||
// Set socket.
|
||||
ipc_c->imc.ipc_handle = socket;
|
||||
ipc_c->imc.log_level = ipc_c->log_level;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -344,8 +345,8 @@ ipc_client_connection_init(struct ipc_connection *ipc_c,
|
|||
|
||||
U_ZERO(ipc_c);
|
||||
ipc_c->imc.ipc_handle = XRT_IPC_HANDLE_INVALID;
|
||||
ipc_c->imc.log_level = log_level;
|
||||
ipc_c->ism_handle = XRT_SHMEM_HANDLE_INVALID;
|
||||
ipc_c->log_level = log_level;
|
||||
|
||||
// Must be done first.
|
||||
int ret = os_mutex_init(&ipc_c->mutex);
|
||||
|
@ -393,6 +394,7 @@ ipc_client_connection_init(struct ipc_connection *ipc_c,
|
|||
|
||||
err_fini:
|
||||
ipc_client_connection_fini(ipc_c);
|
||||
|
||||
return xret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue