API, Android: don't show time/pid in debug message prefix; causes crashes

This commit is contained in:
David Anderson 2017-04-14 11:58:29 -07:00
parent d71616dd7c
commit cae62587af
1 changed files with 6 additions and 0 deletions

View File

@ -250,6 +250,11 @@ static void block_sigalrm();
static int start_worker_signals();
char* boinc_msg_prefix(char* sbuf, int len) {
#ifdef ANDROID
// the time stuff crashes on Android if in a signal handler
//
sbuf[0] = 0;
#else
char buf[256];
struct tm tm;
struct tm *tmp = &tm;
@ -286,6 +291,7 @@ char* boinc_msg_prefix(char* sbuf, int len) {
return sbuf;
}
sbuf[len-1] = 0; // just in case
#endif // ANDROID
return sbuf;
}