summaryrefslogtreecommitdiff
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r--channels/chan_dahdi.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index bbb5c1ac5..b11d114af 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -2943,18 +2943,21 @@ static int my_dial_digits(void *pvt, enum analog_sub sub, struct analog_dialoper
return -1;
}
- if (sub != ANALOG_SUB_REAL)
- printf("Trying to dial digits on sub %d\n", sub);
+ if (sub != ANALOG_SUB_REAL) {
+ ast_log(LOG_ERROR, "Trying to dial_digits '%s' on channel %d subchannel %d\n",
+ dop->dialstr, p->channel, sub);
+ return -1;
+ }
ddop.op = DAHDI_DIAL_OP_REPLACE;
- strncpy(ddop.dialstr, dop->dialstr, sizeof(ddop.dialstr));
+ ast_copy_string(ddop.dialstr, dop->dialstr, sizeof(ddop.dialstr));
- printf("Dialing %s on %d\n", ddop.dialstr, p->channel);
+ ast_debug(1, "Channel %d: Sending '%s' to DAHDI_DIAL.\n", p->channel, ddop.dialstr);
res = ioctl(p->subs[index].dfd, DAHDI_DIAL, &ddop);
-
- if (res == -1)
+ if (res == -1) {
ast_debug(1, "DAHDI_DIAL ioctl failed on %s: %s\n", p->owner->name, strerror(errno));
+ }
return res;
}