ratox

FIFO based tox client
git clone git://git.2f30.org/ratox
Log | Files | Refs | README | LICENSE

commit 33ee6bfc66254e98e7500f8f2613ae0a4d19d87b
parent 328d8f718c2b53edeb7a953f2666977876e23cd1
Author: sin <sin@2f30.org>
Date:   Fri,  3 Oct 2014 12:33:59 +0100

Hangup the call on EPIPE

If you want to switch to another call or want to change the output
device, simply attach another program on the FIFO and kill the first.
This could be another instance of aplay/aucat or simply cat.

Diffstat:
Mratox.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ratox.c b/ratox.c @@ -474,7 +474,8 @@ cbcalldata(ToxAv *av, int32_t cnum, int16_t *data, int len, void *udata) n = write(f->fd[FCALL_OUT], &buf[wrote], len); if (n < 0) { if (errno == EPIPE) { - /* TODO: terminate call here */ + toxav_hangup(toxav, 0); + cancelrxcall(f, "Hangup"); break; } else if (errno == EWOULDBLOCK) { continue; @@ -501,7 +502,6 @@ cancelrxcall(struct friend *f, char *action) dprintf(f->fd[FCALL_PENDING], "0\n"); } - static void cbconnstatus(Tox *m, int32_t frnum, uint8_t status, void *udata) {