From a4c94128c2ee9824dd4763e7d0ba4d3db3a99fe4 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Mon, 16 Mar 2020 14:58:21 -0700 Subject: [PATCH] No logging on EINTR, and log all the errnos --- selfdrive/camerad/cameras/camera_qcom.c | 5 +---- selfdrive/camerad/main.cc | 7 ++----- selfdrive/ui/ui.cc | 7 ++----- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/selfdrive/camerad/cameras/camera_qcom.c b/selfdrive/camerad/cameras/camera_qcom.c index d121603a14..6cef28f215 100644 --- a/selfdrive/camerad/cameras/camera_qcom.c +++ b/selfdrive/camerad/cameras/camera_qcom.c @@ -2117,10 +2117,7 @@ void cameras_run(DualCameraState *s) { int ret = poll(fds, ARRAYSIZE(fds), 1000); if (ret <= 0) { - if (errno == EINTR){ - LOGW("poll EINTR"); - continue; - } + if (errno == EINTR) continue; LOGE("poll failed (%d - %d)", ret, errno); break; } diff --git a/selfdrive/camerad/main.cc b/selfdrive/camerad/main.cc index 7e611960c7..304990ca9d 100644 --- a/selfdrive/camerad/main.cc +++ b/selfdrive/camerad/main.cc @@ -799,11 +799,8 @@ void* visionserver_thread(void* arg) { int ret = zmq_poll(polls, ARRAYSIZE(polls), -1); if (ret < 0) { - if (errno == EINTR){ - LOGW("poll EINTR"); - continue; - } - LOGE("poll failed (%d)", ret); + if (errno == EINTR) continue; + LOGE("poll failed (%d - %d)", ret, errno); break; } if (polls[0].revents) { diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index 49e73cae35..a87ca30031 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -598,12 +598,9 @@ static void ui_update(UIState *s) { int ret = zmq_poll(polls, 1, 1000); #endif if (ret < 0) { - if (errno == EINTR){ - LOGW("poll EINTR"); - continue; - } + if (errno == EINTR) continue; - LOGW("poll failed (%d)", ret); + LOGE("poll failed (%d - %d)", ret, errno); close(s->ipc_fd); s->ipc_fd = -1; s->vision_connected = false;