aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-01-23 20:14:25 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-01-30 03:52:05 +0100
commitf0456795fdce66c35089d058f563764958f3cc28 (patch)
treee9a08e8b8b33fcc33e5c5d99dbb69f7f8409dd1e
parent869ac6f4ebf069eda11d793591c252faf795fa04 (diff)
downloadhardware_replicant_libsamsung-ipc-f0456795fdce66c35089d058f563764958f3cc28.tar.gz
hardware_replicant_libsamsung-ipc-f0456795fdce66c35089d058f563764958f3cc28.tar.bz2
hardware_replicant_libsamsung-ipc-f0456795fdce66c35089d058f563764958f3cc28.zip
ipc_client_open: Add more logging
Without that, we have no clue of what's going on when ipc_client_open fails. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--samsung-ipc/ipc.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c
index 5387611..7df57ec 100644
--- a/samsung-ipc/ipc.c
+++ b/samsung-ipc/ipc.c
@@ -367,10 +367,23 @@ int ipc_client_recv(struct ipc_client *client, struct ipc_message *message)
int ipc_client_open(struct ipc_client *client)
{
- if (client == NULL || client->handlers == NULL || client->handlers->open == NULL)
+ if (client == NULL || client->handlers == NULL || client->handlers->open == NULL) {
+ if (client == NULL) {
+ ipc_client_log(client, "%s failed: client is NULL", __FUNCTION__);
+ }
+ if (client->handlers == NULL) {
+ ipc_client_log(client, "%s failed: client->handlers is NULL",
+ __FUNCTION__);
+ }
+ if (client->handlers->open == NULL) {
+ ipc_client_log(client, "%s failed: client->handlers->open is NULL",
+ __FUNCTION__);
+ }
return -1;
+ }
- return client->handlers->open(client->handlers->transport_data, client->type);
+ return client->handlers->open(client->handlers->transport_data,
+ client->type);
}
int ipc_client_close(struct ipc_client *client)