improve debug

When we fail to read the eventfd, don't try to use the value.
This commit is contained in:
Wim Taymans 2020-05-20 13:33:55 +02:00
parent 1b2f64917e
commit a898f21c87
3 changed files with 3 additions and 4 deletions

View file

@ -1085,7 +1085,7 @@ static void node_on_data_fd_events(struct spa_source *source)
if (SPA_UNLIKELY(spa_system_eventfd_read(this->data_system,
this->data_source.fd, &cmd) < 0))
pw_log_warn(NAME" %p: read failed %m", this);
if (SPA_UNLIKELY(cmd > 1))
else if (SPA_UNLIKELY(cmd > 1))
pw_log_warn(NAME" %p: missed %"PRIu64" wakeups", this, cmd - 1);
spa_log_trace_fp(this->log, NAME" %p: got ready", this);

View file

@ -933,7 +933,7 @@ static void node_on_fd_events(struct spa_source *source)
if (SPA_UNLIKELY(spa_system_eventfd_read(data_system, this->source.fd, &cmd) < 0))
pw_log_warn(NAME" %p: read failed %m", this);
if (SPA_UNLIKELY(cmd > 1))
else if (SPA_UNLIKELY(cmd > 1))
pw_log_warn(NAME" %p: missed %"PRIu64" wakeups", this, cmd - 1);
pw_log_trace_fp(NAME" %p: got process", this);