]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Add a check for when a read() returns zero.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Thu, 31 Oct 2024 17:28:12 +0000 (17:28 +0000)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Thu, 31 Oct 2024 17:28:12 +0000 (17:28 +0000)
rtsp.c

diff --git a/rtsp.c b/rtsp.c
index 1712e4805d21d82d4ed5761d52e72609e0718377..e761899587c8dc18042b3eda2bd0e054cd6f78b0 100644 (file)
--- a/rtsp.c
+++ b/rtsp.c
@@ -1179,9 +1179,13 @@ ssize_t timed_read_from_rtsp_connection(rtsp_conn_info *conn, uint64_t wait_time
             read_encrypted(conn->fd, &conn->ap2_pairing_context.control_cipher_bundle, buf, count);
       } else {
         result = read(conn->fd, buf, count);
+        if (result == 0)
+          debug(1, "AP2 read result 0, for a request count of %u.", count);
       }
 #else
       result = read(conn->fd, buf, count);
+      if (result == 0)
+        debug(1, "AP1 read result 0, for a request count of %u.", count);
 #endif
       if (wait_time != 0)
         remaining_time = time_to_wait_to - get_absolute_time_in_ns();