summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2003-08-13 21:06:00 +0000
committerMark Spencer <markster@digium.com>2003-08-13 21:06:00 +0000
commit67fb880dfb1464d6658dca0cf97ac62305842016 (patch)
tree0bf7f34b694e4439208a5275d8e5858229150665
parent006e49982eb5f4429226a4b7cfda9c580a86696e (diff)
Make chan_zap compile for people without libpri again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-xchannels/chan_zap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 09a2db606..c09d550cf 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -2570,13 +2570,15 @@ static struct ast_frame *zt_handle_event(struct ast_channel *ast)
}
break;
case ZT_EVENT_ALARM:
+#ifdef ZAPATA_PRI
#ifdef PRI_DESTROYCALL
- pri_destroycall(p->pri->pri, p->call);
+ if (p->call && p->pri->pri)
+ pri_destroycall(p->pri->pri, p->call);
p->call = NULL;
- p->owner = NULL;
#else
#error Please "cvs update" and recompile libpri
#endif
+#endif
p->inalarm = 1;
res = get_alarms(p);
ast_log(LOG_WARNING, "Detected alarm on channel %d: %s\n", p->channel, alarm2str(res));