mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 02:33:02 +01:00
redirect stderr before audio init to prevent error spam
This commit is contained in:
parent
5e175d5319
commit
67f637a1e1
@ -700,6 +700,10 @@ int main(int argc, char *argv[])
|
||||
Tox *m = init_tox();
|
||||
init_term();
|
||||
|
||||
/* Redirect stderr to /dev/null
|
||||
NOTE: Might not be best solution. Comment out for debugging. */
|
||||
freopen("/dev/null", "w", stderr);
|
||||
|
||||
if (m == NULL)
|
||||
exit_toxic_err("failed in main", FATALERR_NETWORKINIT);
|
||||
|
||||
@ -752,10 +756,6 @@ int main(int argc, char *argv[])
|
||||
line_info_add(prompt, NULL, NULL, NULL, SYS_MSG, 0, 0, "%s", msg);
|
||||
}
|
||||
|
||||
/* Redirect stderr to /dev/null
|
||||
NOTE: Might not be best solution. Comment out for debugging. */
|
||||
freopen("/dev/null", "w", stderr);
|
||||
|
||||
uint64_t last_save = (uint64_t) time(NULL);
|
||||
uint64_t looptimer = last_save;
|
||||
useconds_t msleepval = 40000;
|
||||
|
@ -78,7 +78,7 @@ typedef enum _FATAL_ERRS {
|
||||
FATALERR_NETWORKINIT = -8, /* Tox network failed to init */
|
||||
FATALERR_INFLOOP = -9, /* infinite loop detected */
|
||||
FATALERR_WININIT = -10, /* window init failed */
|
||||
FATALERR_PROXY = -11, /* Tox network failed to iti using a proxy */
|
||||
FATALERR_PROXY = -11, /* Tox network failed to init using a proxy */
|
||||
} FATAL_ERRS;
|
||||
|
||||
/* Fixes text color problem on some terminals.
|
||||
|
Loading…
Reference in New Issue
Block a user