summaryrefslogtreecommitdiff
path: root/zaptel.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-04-26 05:03:13 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-04-26 05:03:13 +0000
commit94126249cd230d25b882d197e05ea885c921c763 (patch)
treebe0c7f69aca6f1414a357b7a64105aad54721353 /zaptel.c
parent2ddbe20046643511b4aba66119dc8c13301a8240 (diff)
More sleep fixes
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@375 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.c')
-rwxr-xr-xzaptel.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/zaptel.c b/zaptel.c
index 05c8b26..59ab714 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -2563,14 +2563,15 @@ static int zt_timer_ioctl(struct inode *node, struct file *file, unsigned int cm
spin_unlock_irqrestore(&zaptimerlock, flags);
break;
case ZT_GETEVENT: /* Get event on queue */
+ j = ZT_EVENT_NONE;
spin_lock_irqsave(&zaptimerlock, flags);
/* set up for no event */
- put_user(ZT_EVENT_NONE,(int *)data);
if (timer->tripped)
- put_user(ZT_EVENT_TIMER_EXPIRED, (int *)data);
+ j = ZT_EVENT_TIMER_EXPIRED;
if (timer->ping)
- put_user(ZT_EVENT_TIMER_PING, (int *)data);
+ j = ZT_EVENT_TIMER_PING;
spin_unlock_irqrestore(&zaptimerlock, flags);
+ put_user(j,(int *)data);
break;
case ZT_TIMERPING:
spin_lock_irqsave(&zaptimerlock, flags);
@@ -3292,8 +3293,8 @@ static int zt_chanandpseudo_ioctl(struct inode *inode, struct file *file, unsign
return (rv);
break;
case ZT_FLUSH: /* flush input buffer, output buffer, and/or event queue */
- spin_lock_irqsave(&chan->lock, flags);
get_user(i,(int *)data); /* get param */
+ spin_lock_irqsave(&chan->lock, flags);
if (i & ZT_FLUSH_READ) /* if for read (input) */
{
/* initialize read buffers and pointers */