diff options
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 36 |
1 files changed, 32 insertions, 4 deletions
@@ -92,11 +92,26 @@ int ril_client_open(struct ril_client *client) { int rc = 0; - if (client == NULL) + if (client == NULL) { + RIL_LOGD("%s: Skipping open due to Invalid client " + "(client is NULL)", + __func__); + return -1; + } + + if (client->handlers == NULL) { + RIL_LOGD("%s: Skipping open due to Invalid client " + "(client->handlers is NULL)", + __func__); return -1; + } - if (client->handlers == NULL || client->handlers->open == NULL) + if (client->handlers->open == NULL) { + RIL_LOGD("%s: Skipping open due to Invalid client " + "(client->handlers->open is NULL)", + __func__); return -1; + } rc = client->handlers->open(client); if (rc < 0) { @@ -193,11 +208,24 @@ int ril_client_loop(struct ril_client *client) pthread_attr_t attr; int rc; - if (client == NULL) + if (client == NULL) { + RIL_LOGD("%s: Skipping loop due to Invalid client " + "(client is NULL)", __func__); + return -1; + } + + if (client->handlers == NULL) { + RIL_LOGD("%s: Skipping loop due to Invalid client " + "(client->handlers is NULL)", __func__); return -1; + } - if (client->handlers == NULL || client->handlers->loop == NULL) + if (client->handlers->loop == NULL) { + RIL_LOGD("%s: Skipping loop due to Invalid client " + "(client->handlers->loop is NULL)", + __func__); return -1; + } pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); |
