simplify logcatd (#19640)

* simplify logcatd

* add assert

* revert opendbc

* revert opendbc
pull/19644/head
Dean Lee 4 years ago committed by GitHub
parent f232f86a73
commit 6104e4c09e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      selfdrive/logcatd/logcatd_systemd.cc

@ -36,17 +36,9 @@ int main(int argc, char *argv[]) {
// Wait for new message if we didn't receive anything // Wait for new message if we didn't receive anything
if (r == 0){ if (r == 0){
do {
r = sd_journal_wait(journal, 1000 * 1000); r = sd_journal_wait(journal, 1000 * 1000);
assert(r >= 0); assert (r >= 0);
} while (r == SD_JOURNAL_NOP && !do_exit); continue; // Try again
if (do_exit) break;
r = sd_journal_next(journal);
assert(r >= 0);
if (r == 0) continue; // Try again if we still didn't get anything
} }
uint64_t timestamp = 0; uint64_t timestamp = 0;

Loading…
Cancel
Save