diff --git a/src/device.c b/src/device.c index 65f4e53..63f69be 100644 --- a/src/device.c +++ b/src/device.c @@ -122,7 +122,7 @@ DeviceError init_devices() stringed_device_list += strlen( stringed_device_list ) + 1; } } - + // Start poll thread if (pthread_mutex_init(&mutex, NULL) != 0) return de_InternalError; diff --git a/src/global_commands.c b/src/global_commands.c index 3872602..4a00d04 100644 --- a/src/global_commands.c +++ b/src/global_commands.c @@ -191,8 +191,11 @@ void cmd_avatar(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[ return; } - if (strlen(argv[1]) < 3) + /* turns the avatar off */ + if (strlen(argv[1]) < 3) { + tox_set_avatar(m, TOX_AVATAR_FORMAT_NONE, (const uint8_t *) NULL, 0); return; + } if (argv[1][0] != '\"') { line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Path must be enclosed in quotes."); diff --git a/src/help.c b/src/help.c index a44e77b..59389ae 100644 --- a/src/help.c +++ b/src/help.c @@ -20,7 +20,6 @@ * */ -#include #include #include "windows.h" diff --git a/src/input.c b/src/input.c index 028ff06..4fd2b72 100644 --- a/src/input.c +++ b/src/input.c @@ -24,7 +24,6 @@ #define _GNU_SOURCE /* needed for wcwidth() */ #endif -#include #include #include "toxic.h" diff --git a/src/log.c b/src/log.c index 478470d..27e2a20 100644 --- a/src/log.c +++ b/src/log.c @@ -259,7 +259,7 @@ int rename_logfile(char *src, char *dest, const char *selfkey, const char *other on_error: if (log_on) - log_enable(dest, selfkey, otherkey, log, LOG_CHAT); + log_enable(src, selfkey, otherkey, log, LOG_CHAT); return -1; } diff --git a/src/misc_tools.h b/src/misc_tools.h index c222fde..631c391 100644 --- a/src/misc_tools.h +++ b/src/misc_tools.h @@ -22,6 +22,8 @@ #ifndef MISC_TOOLS_H #define MISC_TOOLS_H +#include + #include "windows.h" #include "toxic.h"