diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-07-17 18:18:18 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-09-12 20:37:34 +0200 |
commit | 74c588e62cdcae848459528cb0b6cafdb0c4a194 (patch) | |
tree | 2e6da3175ef2e8d5e94212fab3699a73c47a1eb5 | |
parent | 05a17a339ce274ab3ea6c30fb18b971a4d49de64 (diff) | |
download | hardware_replicant_libsamsung-ipc-74c588e62cdcae848459528cb0b6cafdb0c4a194.tar.gz hardware_replicant_libsamsung-ipc-74c588e62cdcae848459528cb0b6cafdb0c4a194.tar.bz2 hardware_replicant_libsamsung-ipc-74c588e62cdcae848459528cb0b6cafdb0c4a194.zip |
ipc_client_open: Check for client->handlers
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | samsung-ipc/ipc.c | 11 |
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); } |