summaryrefslogtreecommitdiff
path: root/ratox.c
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-10-06 10:50:27 +0100
committersin <sin@2f30.org>2014-10-06 10:50:27 +0100
commite8f7bbdb25d76347523ddb0f70ab59efcbb5c61a (patch)
tree8599dadc75f1618bbfdc42f04a57e5c7394ccedc /ratox.c
parent8cf5ff98325f2899c4ecc932440c228f1f46a46b (diff)
Allow to attach aplay after we've initiated a call
Diffstat (limited to 'ratox.c')
-rw-r--r--ratox.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ratox.c b/ratox.c
index 0aa4e28..f6d0bb6 100644
--- a/ratox.c
+++ b/ratox.c
@@ -1646,8 +1646,6 @@ loop(void)
TAILQ_FOREACH(f, &friendhead, entry) {
if (tox_get_friend_connection_status(tox, f->num) == 0)
continue;
- if (f->av.state != av_CallStarting)
- continue;
if (f->fd[FCALL_OUT] == -1) {
r = openat(f->dirfd, ffiles[FCALL_OUT].name,
ffiles[FCALL_OUT].flags, 0666);
@@ -1656,7 +1654,8 @@ loop(void)
eprintf("openat %s:", ffiles[FCALL_OUT].name);
} else {
f->fd[FCALL_OUT] = r;
- toxav_answer(toxav, f->av.num, &toxavconfig);
+ if (f->av.state == av_CallStarting)
+ toxav_answer(toxav, f->av.num, &toxavconfig);
}
}
}