diff options
Diffstat (limited to 'zaptel.c')
-rwxr-xr-x | zaptel.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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; |