1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-02 09:16:44 +02:00

Display a user warning when log fails to initialize

This commit is contained in:
Jfreegman
2015-08-19 00:42:28 -04:00
committed by cnhenry
parent c546df3917
commit 19cfe3d393
6 changed files with 29 additions and 13 deletions

View File

@ -486,7 +486,9 @@ static void prompt_onInit(ToxWindow *self, Tox *m)
if (user_settings->autolog == AUTOLOG_ON) {
char myid[TOX_ADDRESS_SIZE];
tox_self_get_address(m, (uint8_t *) myid);
log_enable(self->name, myid, NULL, ctx->log, LOG_PROMPT);
if (log_enable(self->name, myid, NULL, ctx->log, LOG_PROMPT) == -1)
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Warning: Log failed to initialize.");
}
scrollok(ctx->history, 0);