From 2fbb559a700328f4d5874c931e6b8c418bba7a3d Mon Sep 17 00:00:00 2001 From: Mark Spencer <markster@digium.com> Date: Sat, 5 Mar 2005 02:08:37 +0000 Subject: [PATCH] Remove accidental libpri dependency (bug #3714) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5139 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_zap.c | 2 ++ include/asterisk/sched.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 3ad5b28e42..f221ca05c2 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -1029,6 +1029,7 @@ static char *event2str(int event) return buf; } +#ifdef ZAPATA_PRI static char *dialplan2str(int dialplan) { if (dialplan == -1) { @@ -1036,6 +1037,7 @@ static char *dialplan2str(int dialplan) } return(pri_plan2str(dialplan)); } +#endif #ifdef ZAPATA_R2 static int str2r2prot(char *swtype) diff --git a/include/asterisk/sched.h b/include/asterisk/sched.h index 5e1ae2087c..40cc391e6f 100755 --- a/include/asterisk/sched.h +++ b/include/asterisk/sched.h @@ -102,6 +102,24 @@ extern int ast_sched_runq(struct sched_context *con); */ extern void ast_sched_dump(struct sched_context *con); +/* + *! Convenience macro for objects and reference (add) + * + */ +#define ast_sched_add_object(obj,con,when,callback) ast_sched_add((con),(when),(callback), ASTOBJ_REF((obj))) + +/* + *! Convenience macro for objects and reference (del) + * + */ +#define ast_sched_del_object(obj,destructor,con,id) do { \ + if ((id) > -1) { \ + ast_sched_del((con),(id)); \ + (id) = -1; \ + ASTOBJ_UNREF((obj),(destructor)); \ + } \ +} while(0) + #if defined(__cplusplus) || defined(c_plusplus) } #endif -- GitLab