summaryrefslogtreecommitdiff
path: root/ratox.c
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-09-30 15:33:48 +0100
committersin <sin@2f30.org>2014-09-30 15:33:48 +0100
commit9220278996070338658410af496cdcb969c0d9c6 (patch)
treea62836388f2babb6e6fc15fe17820aec2183f736 /ratox.c
parent27da57aebfba90702e79642cb71c088be5a6f926 (diff)
Simplify reporting of online status
Diffstat (limited to 'ratox.c')
-rw-r--r--ratox.c6
1 files 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)