From 5ec3b2330e1b6a9d4cda0eef74aca2408bec5250 Mon Sep 17 00:00:00 2001 From: Sebastian Stal Date: Mon, 5 Aug 2013 12:30:40 -0700 Subject: Make test clients compatible with userstatus kinds No features were added, just fixed callbacks. --- testing/toxic/prompt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'testing/toxic/prompt.c') diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c index 463b9352..1ba15695 100644 --- a/testing/toxic/prompt.c +++ b/testing/toxic/prompt.c @@ -91,7 +91,7 @@ static void execute(ToxWindow* self, char* cmd) { dht.ip.i = resolved_address; unsigned char *binary_string = hex_string_to_bin(key); DHT_bootstrap(dht, binary_string); - free(binary_string); + free(binary_string); } else if(!strncmp(cmd, "add ", strlen("add "))) { uint8_t id_bin[32]; @@ -137,7 +137,7 @@ static void execute(ToxWindow* self, char* cmd) { num = m_addfriend(id_bin, (uint8_t*) msg, strlen(msg)+1); switch (num) { - case -1: + case -1: wprintw(self->window, "Message is too long.\n"); break; case -2: @@ -151,7 +151,7 @@ static void execute(ToxWindow* self, char* cmd) { break; case -5: wprintw(self->window, "Undefined error when adding friend.\n"); - break; + break; default: wprintw(self->window, "Friend added as %d.\n", num); on_friendadded(num); @@ -172,7 +172,7 @@ static void execute(ToxWindow* self, char* cmd) { } msg++; - m_set_userstatus((uint8_t*) msg, strlen(msg)+1); + m_set_userstatus(USERSTATUS_KIND_RETAIN, (uint8_t*) msg, strlen(msg)+1); wprintw(self->window, "Status set to: %s\n", msg); } else if(!strncmp(cmd, "nick ", strlen("nick "))) { -- cgit v1.2.3