[Asterisk-cvs] zaptel zaptel.c,1.118,1.119
kpfleming
kpfleming
Wed Sep 28 21:23:22 CDT 2005
- Previous message: [Asterisk-cvs] asterisk/channels chan_agent.c, 1.154,
1.155 chan_iax2.c, 1.350, 1.351 chan_sip.c, 1.869,
1.870 chan_zap.c, 1.526, 1.527
- Next message: [Asterisk-cvs] zaptel zaptel.c, 1.119, 1.120 zaptel.h, 1.46,
1.47 ztcfg.c, 1.22, 1.23
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv8688
Modified Files:
zaptel.c
Log Message:
allow ZT_GETPARAMS to return the master channel number for a channel
Index: zaptel.c
===================================================================
RCS file: /usr/cvsroot/zaptel/zaptel.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -d -r1.118 -r1.119
--- zaptel.c 26 Sep 2005 23:30:24 -0000 1.118
+++ zaptel.c 29 Sep 2005 01:19:59 -0000 1.119
@@ -2754,10 +2754,18 @@
unsigned long flags;
#endif
int i,j;
+ int return_master = 0;
switch(cmd) {
case ZT_GET_PARAMS: /* get channel timing parameters */
copy_from_user(&stack.param,(struct zt_params *)data,sizeof(stack.param));
+
+ /* check to see if the caller wants to receive our master channel number */
+ if (stack.param.channo & 0x40000000) {
+ return_master = 1;
+ stack.param.channo &= ~0x40000000;
+ }
+
/* Pick the right channo's */
if (!stack.param.channo || unit) {
stack.param.channo = unit;
@@ -2766,7 +2774,11 @@
VALID_CHANNEL(stack.param.channo);
chan = chans[stack.param.channo];
- /* point to relevant structure */
+ /* if requested, put the master channel number in the top 16 bits of the result */
+ if (return_master)
+ stack.param.channo |= chan->master->channo << 16;
+
+ /* point to relevant structure */
stack.param.sigtype = chan->sig; /* get signalling type */
/* return non-zero if rx not in idle state */
if (chan->span) {
- Previous message: [Asterisk-cvs] asterisk/channels chan_agent.c, 1.154,
1.155 chan_iax2.c, 1.350, 1.351 chan_sip.c, 1.869,
1.870 chan_zap.c, 1.526, 1.527
- Next message: [Asterisk-cvs] zaptel zaptel.c, 1.119, 1.120 zaptel.h, 1.46,
1.47 ztcfg.c, 1.22, 1.23
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list