From 57621e34ab036cf55f0decc5a74099ea60631a85 Mon Sep 17 00:00:00 2001 From: MelwareDE Date: Thu, 11 Dec 2008 09:43:02 +0000 Subject: [PATCH] Don't try to send DID digits if there are none. --- chan_capi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/chan_capi.c b/chan_capi.c index 9e41838..0ca5b38 100644 --- a/chan_capi.c +++ b/chan_capi.c @@ -2653,12 +2653,14 @@ static void capidev_handle_did_digits(_cmsg *CMSG, unsigned int PLCI, unsigned i update_channel_name(i); if (i->owner->pbx != NULL) { - /* we are already in pbx, so we send the digits as dtmf */ - for (a = 0; a < strlen(did); a++) { - fr.frametype = AST_FRAME_DTMF; - fr.subclass = did[a]; - local_queue_frame(i, &fr); - } + if (did) { + /* we are already in pbx, so we send the digits as dtmf */ + for (a = 0; a < strlen(did); a++) { + fr.frametype = AST_FRAME_DTMF; + fr.subclass = did[a]; + local_queue_frame(i, &fr); + } + } return; }