summaryrefslogtreecommitdiff
path: root/zaptel.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-09-29 02:29:17 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-09-29 02:29:17 +0000
commitbb9675a0268c73b0ad7c8af51b47967e99cda828 (patch)
treea019aeb8d83f2e84e0589c51033f89e0fb9745ae /zaptel.c
parent29c4eb44ca49102abd9e20ba4694e0492e214627 (diff)
update ztcfg to only reconfigured changed channels unless 'force' parameter is supplied
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@781 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.c')
-rwxr-xr-xzaptel.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/zaptel.c b/zaptel.c
index 6a68ffe..6c7c596 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -2761,9 +2761,9 @@ static int zt_common_ioctl(struct inode *node, struct file *file, unsigned int c
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) {
+ if (stack.param.channo & ZT_GET_PARAMS_RETURN_MASTER) {
return_master = 1;
- stack.param.channo &= ~0x40000000;
+ stack.param.channo &= ~ZT_GET_PARAMS_RETURN_MASTER;
}
/* Pick the right channo's */
@@ -2774,10 +2774,6 @@ static int zt_common_ioctl(struct inode *node, struct file *file, unsigned int c
VALID_CHANNEL(stack.param.channo);
chan = chans[stack.param.channo];
- /* 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 */
@@ -2817,6 +2813,11 @@ static int zt_common_ioctl(struct inode *node, struct file *file, unsigned int c
stack.param.rxflashtime = chan->rxflashtime;
stack.param.debouncetime = chan->debouncetime;
stack.param.channo = chan->channo;
+
+ /* 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;
+
stack.param.pulsemaketime = chan->pulsemaketime;
stack.param.pulsebreaktime = chan->pulsebreaktime;
stack.param.pulseaftertime = chan->pulseaftertime;