[pulseaudio-discuss] [PATCH 1/3] log: Remove pa_log_set_fd()

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Thu Jun 20 07:24:26 PDT 2013


The function isn't used any more.
---
 src/pulsecore/log.c | 10 ----------
 src/pulsecore/log.h |  4 ----
 2 files changed, 14 deletions(-)

diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c
index 8066ca5..f1a1876 100644
--- a/src/pulsecore/log.c
+++ b/src/pulsecore/log.c
@@ -190,15 +190,6 @@ void pa_log_set_flags(pa_log_flags_t _flags, pa_log_merge_t merge) {
         flags = _flags;
 }
 
-void pa_log_set_fd(int fd) {
-    if (fd >= 0)
-        log_fd = fd;
-    else if (log_fd >= 0) {
-        pa_close(log_fd);
-        log_fd = -1;
-    }
-}
-
 void pa_log_set_show_backtrace(unsigned nlevels) {
     show_backtrace = nlevels;
 }
@@ -480,7 +471,6 @@ void pa_log_levelv_meta(
                     if ((write(log_fd, metadata, strlen(metadata)) < 0) || (write(log_fd, t, strlen(t)) < 0)) {
                         pa_log_target new_target = { .type = PA_LOG_STDERR, .file = NULL };
                         saved_errno = errno;
-                        pa_log_set_fd(-1);
                         fprintf(stderr, "%s\n", "Error writing logs to a file descriptor. Redirect log messages to console.");
                         fprintf(stderr, "%s %s\n", metadata, t);
                         pa_log_set_target(&new_target);
diff --git a/src/pulsecore/log.h b/src/pulsecore/log.h
index dd5e371..ee34c2c 100644
--- a/src/pulsecore/log.h
+++ b/src/pulsecore/log.h
@@ -80,10 +80,6 @@ void pa_log_set_level(pa_log_level_t l);
 /* Set flags */
 void pa_log_set_flags(pa_log_flags_t flags, pa_log_merge_t merge);
 
-/* Set the file descriptor of the logging device.
-   Daemon conf is in charge of opening this device */
-void pa_log_set_fd(int fd);
-
 /* Enable backtrace */
 void pa_log_set_show_backtrace(unsigned nlevels);
 
-- 
1.8.1.2



More information about the pulseaudio-discuss mailing list