[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] pstream: Log "Cannot send block reference..." only once per pstream

PulseAudio Marge Bot gitlab at gitlab.freedesktop.org
Thu Dec 10 16:36:58 UTC 2020



PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio


Commits:
3afb7f8c by Tanu Kaskinen at 2020-12-10T16:31:13+00:00
pstream: Log "Cannot send block reference..." only once per pstream

Despite the ratelimiting, this error gets logged too much.

I fixed a typo (Fallig -> Falling) while at it.

Related: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/824
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/265>

- - - - -


1 changed file:

- src/pulsecore/pstream.c


Changes:

=====================================
src/pulsecore/pstream.c
=====================================
@@ -154,6 +154,7 @@ struct pa_pstream {
      * @registered_memfd_ids: registered memfd pools SHM IDs. Check
      * pa_pstream_register_memfd_mempool() for more information. */
     bool use_shm, use_memfd;
+    bool non_registered_memfd_id_error_logged;
     pa_idxset *registered_memfd_ids;
 
     pa_memimport *import;
@@ -677,9 +678,11 @@ static void prepare_next_write_item(pa_pstream *p) {
                         flags |= PA_FLAG_SHMDATA_MEMFD_BLOCK;
                         send_payload = false;
                     } else {
-                        if (pa_log_ratelimit(PA_LOG_ERROR)) {
+                        if (!p->non_registered_memfd_id_error_logged) {
                             pa_log("Cannot send block reference with non-registered memfd ID = %u", shm_id);
-                            pa_log("Fallig back to copying full block data over socket");
+                            pa_log("Falling back to copying full block data over socket");
+                            pa_log("There's a bug report about this: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/824");
+                            p->non_registered_memfd_id_error_logged = true;
                         }
                     }
                 }



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/3afb7f8c08ab6ce8e47075f7484f470c8c561a11

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/3afb7f8c08ab6ce8e47075f7484f470c8c561a11
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20201210/e8df54f6/attachment.htm>


More information about the pulseaudio-commits mailing list