diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2012-09-19 19:04:07 +0200 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2012-09-19 19:04:07 +0200 |
commit | afb3c6b921053af7d92701f3580be6c04a337990 (patch) | |
tree | 73b56856a67744b063d6d7318b208b9c511c883c | |
parent | 09604e794f5876ea13787097f6c1e88a29944ab5 (diff) | |
download | hardware_ril_samsung-ril-afb3c6b921053af7d92701f3580be6c04a337990.zip hardware_ril_samsung-ril-afb3c6b921053af7d92701f3580be6c04a337990.tar.gz hardware_ril_samsung-ril-afb3c6b921053af7d92701f3580be6c04a337990.tar.bz2 |
Call: return NULL and 0 len when no calls are to be listed
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r-- | call.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -167,6 +167,13 @@ void ipc_call_list(struct ipc_message_info *info) int i; num_entries = *((unsigned char *) info->data); + + if(num_entries == 0) { + // Don't bother with mem alloc + + RIL_onRequestComplete(reqGetToken(info->aseq), RIL_E_SUCCESS, NULL, 0); + } + entry = (struct ipc_call_list_entry *) ((char *) info->data + 1); RIL_Call **calls = (RIL_Call **) malloc(num_entries * sizeof(RIL_Call *)); |