[Asterisk-cvs] asterisk channel.c,1.243,1.244
kpfleming
kpfleming
Tue Oct 4 19:33:10 CDT 2005
- Previous message: [Asterisk-cvs] zaptel pciradio.c, 1.18, 1.19 tor2.c, 1.26,
1.27 wcfxo.c, 1.30, 1.31 wct1xxp.c, 1.24, 1.25 wct4xxp.c, 1.91,
1.92 wctdm.c, 1.126, 1.127 wcte11xp.c, 1.14, 1.15 zaptel.h,
1.49, 1.50
- Next message: [Asterisk-cvs] asterisk/include/asterisk channel.h,1.102,1.103
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv1835
Modified Files:
channel.c
Log Message:
support call duration limits on inbound OSP calls (issue #5346)
Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.243
retrieving revision 1.244
diff -u -d -r1.243 -r1.244
--- channel.c 29 Sep 2005 17:40:24 -0000 1.243
+++ channel.c 4 Oct 2005 23:28:57 -0000 1.244
@@ -273,6 +273,31 @@
return;
}
+/*--- ast_channel_cmpwhentohangup: Compare a offset with when to hangup channel */
+int ast_channel_cmpwhentohangup(struct ast_channel *chan, time_t offset)
+{
+ time_t whentohangup;
+
+ if (chan->whentohangup == 0) {
+ if (offset == 0)
+ return (0);
+ else
+ return (-1);
+ } else {
+ if (offset == 0)
+ return (1);
+ else {
+ whentohangup = offset + time (NULL);
+ if (chan->whentohangup < whentohangup)
+ return (1);
+ else if (chan->whentohangup == whentohangup)
+ return (0);
+ else
+ return (-1);
+ }
+ }
+}
+
/*--- ast_channel_register: Register a new telephony channel in Asterisk */
int ast_channel_register(const struct ast_channel_tech *tech)
{
- Previous message: [Asterisk-cvs] zaptel pciradio.c, 1.18, 1.19 tor2.c, 1.26,
1.27 wcfxo.c, 1.30, 1.31 wct1xxp.c, 1.24, 1.25 wct4xxp.c, 1.91,
1.92 wctdm.c, 1.126, 1.127 wcte11xp.c, 1.14, 1.15 zaptel.h,
1.49, 1.50
- Next message: [Asterisk-cvs] asterisk/include/asterisk channel.h,1.102,1.103
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list