diff options
author | sin <sin@2f30.org> | 2014-09-30 15:33:48 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-09-30 15:33:48 +0100 |
commit | 9220278996070338658410af496cdcb969c0d9c6 (patch) | |
tree | a62836388f2babb6e6fc15fe17820aec2183f736 | |
parent | 27da57aebfba90702e79642cb71c088be5a6f926 (diff) |
Simplify reporting of online status
-rw-r--r-- | ratox.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |