for (;;) {
i = DAHDI_IOMUX_READ | DAHDI_IOMUX_SIGEVENT;
- if ((res = ioctl(p->subs[idx].dfd, DAHDI_IOMUX, &i))) {
+ res = ioctl(p->subs[idx].dfd, DAHDI_IOMUX, &i);
+ if (res) {
ast_log(LOG_WARNING, "I/O MUX failed: %s\n", strerror(errno));
ast_hangup(chan);
return 1;
}
if (analog_p->ringt > 0) {
if (!(--analog_p->ringt)) {
- res = -1;
break;
}
}
char dtmfbuf[300];
char namebuf[ANALOG_MAX_CID];
char numbuf[ANALOG_MAX_CID];
- struct callerid_state *cs = NULL;
char *name = NULL, *number = NULL;
int flags = 0;
struct ast_smdi_md_message *smdi_msg = NULL;
int timeout_ms;
int ms;
struct timeval start = ast_tvnow();
- cs = NULL;
ast_debug(1, "Receiving DTMF cid on channel %s\n", ast_channel_name(chan));
oldlinearity = analog_set_linear_mode(p, idx, 0);
} else {
ast_log(LOG_WARNING, "Unable to get caller ID space\n");
}
- } else {
- cs = NULL;
}
if (number) {
}
ast_set_callerid(chan, number, name, number);
- if (cs) {
- callerid_free(cs);
- }
-
analog_handle_notify_message(chan, p, flags, -1);
ast_channel_lock(chan);