summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2012-09-19 19:04:07 +0200
committerPaul Kocialkowski <contact@paulk.fr>2012-09-19 19:04:07 +0200
commitafb3c6b921053af7d92701f3580be6c04a337990 (patch)
tree73b56856a67744b063d6d7318b208b9c511c883c
parent09604e794f5876ea13787097f6c1e88a29944ab5 (diff)
downloadhardware_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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/call.c b/call.c
index 8a7f8cf..7b4a96b 100644
--- a/call.c
+++ b/call.c
@@ -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 *));