aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-07-17 18:18:18 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-09-12 17:48:10 +0200
commit185b27aa2a283b0e6fa8ab08e38693f7030c7d2c (patch)
tree846a90993b0bec95fd1e928c641798e5ba6007c9
parente2ae94408dea2a76393be923532d9e66dddc411d (diff)
downloadhardware_replicant_libsamsung-ipc-185b27aa2a283b0e6fa8ab08e38693f7030c7d2c.tar.gz
hardware_replicant_libsamsung-ipc-185b27aa2a283b0e6fa8ab08e38693f7030c7d2c.tar.bz2
hardware_replicant_libsamsung-ipc-185b27aa2a283b0e6fa8ab08e38693f7030c7d2c.zip
ipc_client_open: Check for client->handlers
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--samsung-ipc/ipc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c
index f7e0379..3a6e376 100644
--- a/samsung-ipc/ipc.c
+++ b/samsung-ipc/ipc.c
@@ -343,8 +343,15 @@ 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)
- return -1;
+ if (client == NULL || client->handlers == NULL || client->handlers->open == NULL) {
+ if (client->handlers == NULL) {
+ ipc_client_log(client, "%s: 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);
}