]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Make chan_zap compile for people without libpri again
authorMark Spencer <markster@digium.com>
Wed, 13 Aug 2003 21:06:00 +0000 (21:06 +0000)
committerMark Spencer <markster@digium.com>
Wed, 13 Aug 2003 21:06:00 +0000 (21:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1316 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 09a2db606394dc5ff527567f4972e516368b33a9..c09d550cf89fafb1c2924e059c4b91131fd19e77 100755 (executable)
@@ -2570,12 +2570,14 @@ 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);