ratox

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

commit 9220278996070338658410af496cdcb969c0d9c6
parent 27da57aebfba90702e79642cb71c088be5a6f926
Author: sin <sin@2f30.org>
Date:   Tue, 30 Sep 2014 15:33:48 +0100

Simplify reporting of online status

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

diff --git a/ratox.c b/ratox.c @@ -298,7 +298,7 @@ cbconnstatus(Tox *m, int32_t frnum, uint8_t status, void *udata) TAILQ_FOREACH(f, &friendhead, entry) { if (f->num == frnum) { ftruncate(f->fd[FONLINE], 0); - dprintf(f->fd[FONLINE], status == 0 ? "0\n" : "1\n"); + dprintf(f->fd[FONLINE], "%d\n", status); return; } } @@ -945,8 +945,8 @@ friendcreate(int32_t frnum) dprintf(f->fd[FNAME], "%s\n", f->name); ftruncate(f->fd[FONLINE], 0); - dprintf(f->fd[FONLINE], "%s\n", - tox_get_friend_connection_status(tox, frnum) == 0 ? "0" : "1"); + dprintf(f->fd[FONLINE], "%d\n", + tox_get_friend_connection_status(tox, frnum)); r = tox_get_status_message_size(tox, frnum); if (r > sizeof(status) - 1)