summaryrefslogtreecommitdiff
path: root/android/hal-handsfree.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2014-03-07 16:00:19 +0100
committerSzymon Janc <szymon.janc@tieto.com>2014-03-10 12:32:14 +0100
commit7e64c7a0d58513ae141091f8fa7857df900c2923 (patch)
treed21556dd8eb64870d112e45d75e091c1584aa65f /android/hal-handsfree.c
parent90e195b088eab33bf387fd284e4c81d4e3f90524 (diff)
downloadbluez-7e64c7a0d58513ae141091f8fa7857df900c2923.tar.gz
android/hal-handsfree: Fix handling of dial notification
Empty number means re-dial and should be passed as NULL.
Diffstat (limited to 'android/hal-handsfree.c')
-rw-r--r--android/hal-handsfree.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/android/hal-handsfree.c b/android/hal-handsfree.c
index 5f484fe07..31793b066 100644
--- a/android/hal-handsfree.c
+++ b/android/hal-handsfree.c
@@ -91,8 +91,13 @@ static void handle_dial(void *buf, uint16_t len)
exit(EXIT_FAILURE);
}
- if (cbs->dial_call_cmd_cb)
+ if (!cbs->dial_call_cmd_cb)
+ return;
+
+ if (ev->number_len)
cbs->dial_call_cmd_cb((char *) ev->number);
+ else
+ cbs->dial_call_cmd_cb(NULL);
}
static void handle_dtmf(void *buf, uint16_t len)