From c3364cb7d304c9bd83b633095cd88d7b8c08ea18 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Wed, 28 Feb 2007 08:31:15 +0000 Subject: If the span sets its sync_tick method, call it on every tick of the sync master. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2249 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- zaptel.c | 4 ++++ zaptel.h | 5 +++++ zconfig.h | 1 + 3 files changed, 10 insertions(+) diff --git a/zaptel.c b/zaptel.c index c519310..65e7426 100644 --- a/zaptel.c +++ b/zaptel.c @@ -6631,6 +6631,10 @@ int zt_transmit(struct zt_span *span) int x,y,z; unsigned long flags; +#ifdef ZAPTEL_SYNC_TICK + if(span->sync_tick) + span->sync_tick(span, span == master); +#endif #if 1 for (x=0;xchannels;x++) { spin_lock_irqsave(&span->chans[x].lock, flags); diff --git a/zaptel.h b/zaptel.h index 621d92e..56369c9 100644 --- a/zaptel.h +++ b/zaptel.h @@ -1376,6 +1376,11 @@ struct zt_span { /* Opt: Enable maintenance modes */ int (*maint)(struct zt_span *span, int mode); +#ifdef ZAPTEL_SYNC_TICK + /* Opt: send sync to spans */ + int (*sync_tick)(struct zt_span *span, int is_master); +#endif + /* ==== Channel Callback Operations ==== */ /* Opt: Set signalling type (if appropriate) */ int (*chanconfig)(struct zt_chan *chan, int sigtype); diff --git a/zconfig.h b/zconfig.h index 27f91f8..cbfec91 100644 --- a/zconfig.h +++ b/zconfig.h @@ -176,5 +176,6 @@ * Most applications will want this commented out. */ /* #define FXSFLASH */ +#define ZAPTEL_SYNC_TICK #endif -- cgit v1.2.3