From 9220278996070338658410af496cdcb969c0d9c6 Mon Sep 17 00:00:00 2001 From: sin Date: Tue, 30 Sep 2014 15:33:48 +0100 Subject: Simplify reporting of online status --- ratox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ratox.c b/ratox.c index dce458e..aa57a33 100644 --- 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) -- cgit v1.2.3