From e385d93e5aad6a6fce754c00c804ff1d6a6746d4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 18 Aug 2006 21:38:40 +0000 Subject: remove all occurences of pa_logXXX(__FILE__": and replace them by pa_logXXX(" git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1272 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/daemon/caps.c | 6 +-- src/daemon/cmdline.c | 20 ++++----- src/daemon/cpulimit.c | 2 +- src/daemon/daemon-conf.c | 12 ++--- src/daemon/main.c | 68 ++++++++++++++--------------- src/modules/alsa-util.c | 22 +++++----- src/modules/dbus-util.c | 2 +- src/modules/gconf/module-gconf.c | 14 +++--- src/modules/module-alsa-sink.c | 38 ++++++++-------- src/modules/module-alsa-source.c | 38 ++++++++-------- src/modules/module-cli.c | 8 ++-- src/modules/module-combine.c | 32 +++++++------- src/modules/module-detect.c | 14 +++--- src/modules/module-esound-compat-spawnfd.c | 4 +- src/modules/module-esound-compat-spawnpid.c | 4 +- src/modules/module-esound-sink.c | 24 +++++----- src/modules/module-hal-detect.c | 28 ++++++------ src/modules/module-jack-sink.c | 28 ++++++------ src/modules/module-jack-source.c | 28 ++++++------ src/modules/module-lirc.c | 20 ++++----- src/modules/module-match.c | 10 ++--- src/modules/module-mmkbd-evdev.c | 28 ++++++------ src/modules/module-native-protocol-fd.c | 4 +- src/modules/module-null-sink.c | 6 +-- src/modules/module-oss-mmap.c | 52 +++++++++++----------- src/modules/module-oss.c | 34 +++++++-------- src/modules/module-pipe-sink.c | 14 +++--- src/modules/module-pipe-source.c | 14 +++--- src/modules/module-protocol-stub.c | 10 ++--- src/modules/module-rescue-streams.c | 18 ++++---- src/modules/module-sine.c | 6 +-- src/modules/module-solaris.c | 36 +++++++-------- src/modules/module-tunnel.c | 58 ++++++++++++------------ src/modules/module-volume-restore.c | 20 ++++----- src/modules/module-waveout.c | 24 +++++----- src/modules/module-x11-bell.c | 10 ++--- src/modules/module-x11-publish.c | 8 ++-- src/modules/module-zeroconf-publish.c | 22 +++++----- src/modules/oss-util.c | 32 +++++++------- src/modules/rtp/module-rtp-recv.c | 24 +++++----- src/modules/rtp/module-rtp-send.c | 36 +++++++-------- src/modules/rtp/rtp.c | 18 ++++---- src/modules/rtp/sap.c | 16 +++---- src/modules/rtp/sdp.c | 16 +++---- src/pulse/client-conf-x11.c | 4 +- src/pulse/client-conf.c | 2 +- src/pulse/context.c | 8 ++-- src/pulse/mainloop-signal.c | 6 +-- src/pulse/mainloop.c | 6 +-- src/pulse/thread-mainloop.c | 2 +- src/pulse/util.c | 6 +-- src/pulsecore/authkey.c | 16 +++---- src/pulsecore/cli.c | 4 +- src/pulsecore/client.c | 8 ++-- src/pulsecore/conf-parser.c | 12 ++--- src/pulsecore/core-scache.c | 4 +- src/pulsecore/core-subscribe.c | 6 +-- src/pulsecore/core-util.c | 52 +++++++++++----------- src/pulsecore/ioline.c | 4 +- src/pulsecore/ipacl.c | 12 ++--- src/pulsecore/memblock.c | 6 +-- src/pulsecore/memblockq.c | 4 +- src/pulsecore/modinfo.c | 2 +- src/pulsecore/module.c | 14 +++--- src/pulsecore/pdispatch.c | 4 +- src/pulsecore/pid.c | 28 ++++++------ src/pulsecore/protocol-cli.c | 2 +- src/pulsecore/protocol-esound.c | 36 +++++++-------- src/pulsecore/protocol-http.c | 4 +- src/pulsecore/protocol-native.c | 48 ++++++++++---------- src/pulsecore/protocol-simple.c | 18 ++++---- src/pulsecore/pstream.c | 24 +++++----- src/pulsecore/random.c | 4 +- src/pulsecore/sample-util.c | 4 +- src/pulsecore/shm.c | 18 ++++---- src/pulsecore/sink-input.c | 12 ++--- src/pulsecore/sink.c | 6 +-- src/pulsecore/socket-client.c | 14 +++--- src/pulsecore/socket-server.c | 38 ++++++++-------- src/pulsecore/socket-util.c | 6 +-- src/pulsecore/sound-file-stream.c | 4 +- src/pulsecore/sound-file.c | 12 ++--- src/pulsecore/source-output.c | 12 ++--- src/pulsecore/source.c | 4 +- src/pulsecore/x11wrap.c | 2 +- src/utils/pacmd.c | 20 ++++----- src/utils/pax11publish.c | 2 +- 87 files changed, 714 insertions(+), 714 deletions(-) (limited to 'src') diff --git a/src/daemon/caps.c b/src/daemon/caps.c index 8ae43fb2..cebdaebc 100644 --- a/src/daemon/caps.c +++ b/src/daemon/caps.c @@ -54,7 +54,7 @@ void pa_drop_root(void) { if (uid == 0 || geteuid() != 0) return; - pa_log_info(__FILE__": dropping root rights."); + pa_log_info("dropping root rights."); #if defined(HAVE_SETRESUID) setresuid(uid, uid, uid); @@ -96,7 +96,7 @@ int pa_limit_caps(void) { if (cap_set_proc(caps) < 0) goto fail; - pa_log_info(__FILE__": dropped capabilities successfully."); + pa_log_info("dropped capabilities successfully."); r = 0; @@ -121,7 +121,7 @@ int pa_drop_caps(void) { cap_clear(caps); if (cap_set_proc(caps) < 0) { - pa_log(__FILE__": failed to drop capabilities: %s", pa_cstrerror(errno)); + pa_log("failed to drop capabilities: %s", pa_cstrerror(errno)); goto fail; } diff --git a/src/daemon/cmdline.c b/src/daemon/cmdline.c index e00f290e..d3fe8e65 100644 --- a/src/daemon/cmdline.c +++ b/src/daemon/cmdline.c @@ -199,14 +199,14 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d case ARG_DAEMONIZE: case 'D': if ((conf->daemonize = optarg ? pa_parse_boolean(optarg) : 1) < 0) { - pa_log(__FILE__": --daemonize expects boolean argument"); + pa_log("--daemonize expects boolean argument"); goto fail; } break; case ARG_FAIL: if ((conf->fail = optarg ? pa_parse_boolean(optarg) : 1) < 0) { - pa_log(__FILE__": --fail expects boolean argument"); + pa_log("--fail expects boolean argument"); goto fail; } break; @@ -216,7 +216,7 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d if (optarg) { if (pa_daemon_conf_set_log_level(conf, optarg) < 0) { - pa_log(__FILE__": --log-level expects log level argument (either numeric in range 0..4 or one of debug, info, notice, warn, error)."); + pa_log("--log-level expects log level argument (either numeric in range 0..4 or one of debug, info, notice, warn, error)."); goto fail; } } else { @@ -228,21 +228,21 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d case ARG_HIGH_PRIORITY: if ((conf->high_priority = optarg ? pa_parse_boolean(optarg) : 1) < 0) { - pa_log(__FILE__": --high-priority expects boolean argument"); + pa_log("--high-priority expects boolean argument"); goto fail; } break; case ARG_DISALLOW_MODULE_LOADING: if ((conf->disallow_module_loading = optarg ? pa_parse_boolean(optarg) : 1) < 0) { - pa_log(__FILE__": --disallow-module-loading expects boolean argument"); + pa_log("--disallow-module-loading expects boolean argument"); goto fail; } break; case ARG_USE_PID_FILE: if ((conf->use_pid_file = optarg ? pa_parse_boolean(optarg) : 1) < 0) { - pa_log(__FILE__": --use-pid-file expects boolean argument"); + pa_log("--use-pid-file expects boolean argument"); goto fail; } break; @@ -260,7 +260,7 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d case ARG_LOG_TARGET: if (pa_daemon_conf_set_log_target(conf, optarg) < 0) { - pa_log(__FILE__": Invalid log target: use either 'syslog', 'stderr' or 'auto'."); + pa_log("Invalid log target: use either 'syslog', 'stderr' or 'auto'."); goto fail; } break; @@ -279,21 +279,21 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d case ARG_RESAMPLE_METHOD: if (pa_daemon_conf_set_resample_method(conf, optarg) < 0) { - pa_log(__FILE__": Invalid resample method '%s'.", optarg); + pa_log("Invalid resample method '%s'.", optarg); goto fail; } break; case ARG_SYSTEM: if ((conf->system_instance = optarg ? pa_parse_boolean(optarg) : 1) < 0) { - pa_log(__FILE__": --system expects boolean argument"); + pa_log("--system expects boolean argument"); goto fail; } break; case ARG_NO_CPU_LIMIT: if ((conf->no_cpu_limit = optarg ? pa_parse_boolean(optarg) : 1) < 0) { - pa_log(__FILE__": --no-cpu-limit expects boolean argument"); + pa_log("--no-cpu-limit expects boolean argument"); goto fail; } break; diff --git a/src/daemon/cpulimit.c b/src/daemon/cpulimit.c index b8740ea0..d7466b06 100644 --- a/src/daemon/cpulimit.c +++ b/src/daemon/cpulimit.c @@ -172,7 +172,7 @@ int pa_cpu_limit_init(pa_mainloop_api *m) { /* Prepare the main loop pipe */ if (pipe(the_pipe) < 0) { - pa_log(__FILE__": pipe() failed: %s", pa_cstrerror(errno)); + pa_log("pipe() failed: %s", pa_cstrerror(errno)); return -1; } diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c index 3e585d90..2cb06697 100644 --- a/src/daemon/daemon-conf.c +++ b/src/daemon/daemon-conf.c @@ -168,7 +168,7 @@ static int parse_log_target(const char *filename, unsigned line, const char *lva assert(filename && lvalue && rvalue && data); if (pa_daemon_conf_set_log_target(c, rvalue) < 0) { - pa_log(__FILE__": [%s:%u] Invalid log target '%s'.", filename, line, rvalue); + pa_log("[%s:%u] Invalid log target '%s'.", filename, line, rvalue); return -1; } @@ -180,7 +180,7 @@ static int parse_log_level(const char *filename, unsigned line, const char *lval assert(filename && lvalue && rvalue && data); if (pa_daemon_conf_set_log_level(c, rvalue) < 0) { - pa_log(__FILE__": [%s:%u] Invalid log level '%s'.", filename, line, rvalue); + pa_log("[%s:%u] Invalid log level '%s'.", filename, line, rvalue); return -1; } @@ -192,7 +192,7 @@ static int parse_resample_method(const char *filename, unsigned line, const char assert(filename && lvalue && rvalue && data); if (pa_daemon_conf_set_resample_method(c, rvalue) < 0) { - pa_log(__FILE__": [%s:%u] Inavalid resample method '%s'.", filename, line, rvalue); + pa_log("[%s:%u] Inavalid resample method '%s'.", filename, line, rvalue); return -1; } @@ -214,14 +214,14 @@ static int parse_rlimit(const char *filename, unsigned line, const char *lvalue, } else { int32_t k; if (pa_atoi(rvalue, &k) < 0) { - pa_log(__FILE__": [%s:%u] Inavalid rlimit '%s'.", filename, line, rvalue); + pa_log("[%s:%u] Inavalid rlimit '%s'.", filename, line, rvalue); return -1; } r->is_set = k >= 0; r->value = k >= 0 ? (rlim_t) k : 0; } #else - pa_log_warn(__FILE__": [%s:%u] rlimit not supported on this platform.", filename, line); + pa_log_warn("[%s:%u] rlimit not supported on this platform.", filename, line); #endif return 0; @@ -308,7 +308,7 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) { pa_open_config_file(DEFAULT_CONFIG_FILE, DEFAULT_CONFIG_FILE_USER, ENV_CONFIG_FILE, &c->config_file, "r"); if (!f && errno != ENOENT) { - pa_log(__FILE__": WARNING: failed to open configuration file '%s': %s", c->config_file, pa_cstrerror(errno)); + pa_log("WARNING: failed to open configuration file '%s': %s", c->config_file, pa_cstrerror(errno)); goto finish; } diff --git a/src/daemon/main.c b/src/daemon/main.c index aada0ad7..95ba6dd5 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -117,7 +117,7 @@ static void message_cb(pa_mainloop_api*a, pa_time_event*e, PA_GCC_UNUSED const s #endif static void signal_callback(pa_mainloop_api*m, PA_GCC_UNUSED pa_signal_event *e, int sig, void *userdata) { - pa_log_info(__FILE__": Got signal %s.", pa_strsignal(sig)); + pa_log_info("Got signal %s.", pa_strsignal(sig)); switch (sig) { #ifdef SIGUSR1 @@ -144,7 +144,7 @@ static void signal_callback(pa_mainloop_api*m, PA_GCC_UNUSED pa_signal_event *e, case SIGINT: case SIGTERM: default: - pa_log_info(__FILE__": Exiting."); + pa_log_info("Exiting."); m->quit(m, 1); break; } @@ -172,34 +172,34 @@ static int change_user(void) { * afterwards. */ if (!(pw = getpwnam(PA_SYSTEM_USER))) { - pa_log(__FILE__": Failed to find user '%s'.", PA_SYSTEM_USER); + pa_log("Failed to find user '%s'.", PA_SYSTEM_USER); return -1; } if (!(gr = getgrnam(PA_SYSTEM_GROUP))) { - pa_log(__FILE__": Failed to find group '%s'.", PA_SYSTEM_GROUP); + pa_log("Failed to find group '%s'.", PA_SYSTEM_GROUP); return -1; } - pa_log_info(__FILE__": Found user '%s' (UID %lu) and group '%s' (GID %lu).", + pa_log_info("Found user '%s' (UID %lu) and group '%s' (GID %lu).", PA_SYSTEM_USER, (unsigned long) pw->pw_uid, PA_SYSTEM_GROUP, (unsigned long) gr->gr_gid); if (pw->pw_gid != gr->gr_gid) { - pa_log(__FILE__": GID of user '%s' and of group '%s' don't match.", PA_SYSTEM_USER, PA_SYSTEM_GROUP); + pa_log("GID of user '%s' and of group '%s' don't match.", PA_SYSTEM_USER, PA_SYSTEM_GROUP); return -1; } if (strcmp(pw->pw_dir, PA_SYSTEM_RUNTIME_PATH) != 0) - pa_log_warn(__FILE__": Warning: home directory of user '%s' is not '%s', ignoring.", PA_SYSTEM_USER, PA_SYSTEM_RUNTIME_PATH); + pa_log_warn("Warning: home directory of user '%s' is not '%s', ignoring.", PA_SYSTEM_USER, PA_SYSTEM_RUNTIME_PATH); if (pa_make_secure_dir(PA_SYSTEM_RUNTIME_PATH, 0755, pw->pw_uid, gr->gr_gid) < 0) { - pa_log(__FILE__": Failed to create '%s': %s", PA_SYSTEM_RUNTIME_PATH, pa_cstrerror(errno)); + pa_log("Failed to create '%s': %s", PA_SYSTEM_RUNTIME_PATH, pa_cstrerror(errno)); return -1; } if (initgroups(PA_SYSTEM_USER, gr->gr_gid) != 0) { - pa_log(__FILE__": Failed to change group list: %s", pa_cstrerror(errno)); + pa_log("Failed to change group list: %s", pa_cstrerror(errno)); return -1; } @@ -215,7 +215,7 @@ static int change_user(void) { #endif if (r < 0) { - pa_log(__FILE__": Failed to change GID: %s", pa_cstrerror(errno)); + pa_log("Failed to change GID: %s", pa_cstrerror(errno)); return -1; } @@ -231,7 +231,7 @@ static int change_user(void) { #endif if (r < 0) { - pa_log(__FILE__": Failed to change UID: %s", pa_cstrerror(errno)); + pa_log("Failed to change UID: %s", pa_cstrerror(errno)); return -1; } @@ -243,7 +243,7 @@ static int change_user(void) { set_env("PULSE_RUNTIME_PATH", PA_SYSTEM_RUNTIME_PATH); set_env("PULSE_CONFIG_PATH", PA_SYSTEM_RUNTIME_PATH); - pa_log_info(__FILE__": Successfully dropped root privileges."); + pa_log_info("Successfully dropped root privileges."); return 0; } @@ -251,7 +251,7 @@ static int change_user(void) { #else /* HAVE_PWD_H && HAVE_GRP_H */ static int change_user(void) { - pa_log(__FILE__": System wide mode unsupported on this platform."); + pa_log("System wide mode unsupported on this platform."); return -1; } @@ -267,7 +267,7 @@ static int create_runtime_dir(void) { * /tmp/ with the current UID/GID */ if (pa_make_secure_dir(fn, 0700, (uid_t)-1, (gid_t)-1) < 0) { - pa_log(__FILE__": Failed to create '%s': %s", fn, pa_cstrerror(errno)); + pa_log("Failed to create '%s': %s", fn, pa_cstrerror(errno)); return -1; } @@ -286,7 +286,7 @@ static void set_one_rlimit(const pa_rlimit *r, int resource, const char *name) { rl.rlim_cur = rl.rlim_max = r->value; if (setrlimit(resource, &rl) < 0) - pa_log_warn(__FILE__": setrlimit(%s, (%u, %u)) failed: %s", name, (unsigned) r->value, (unsigned) r->value, pa_cstrerror(errno)); + pa_log_warn("setrlimit(%s, (%u, %u)) failed: %s", name, (unsigned) r->value, (unsigned) r->value, pa_cstrerror(errno)); } static void set_all_rlimits(const pa_daemon_conf *conf) { @@ -335,7 +335,7 @@ int main(int argc, char *argv[]) { suid_root = !real_root && geteuid() == 0; if (suid_root && (pa_own_uid_in_group(PA_REALTIME_GROUP, &gid) <= 0 || gid >= 1000)) { - pa_log_warn(__FILE__": WARNING: called SUID root, but not in group '"PA_REALTIME_GROUP"'."); + pa_log_warn("WARNING: called SUID root, but not in group '"PA_REALTIME_GROUP"'."); pa_drop_root(); } #else @@ -368,7 +368,7 @@ int main(int argc, char *argv[]) { goto finish; if (pa_cmdline_parse(conf, argc, argv, &d) < 0) { - pa_log(__FILE__": failed to parse command line."); + pa_log("failed to parse command line."); goto finish; } @@ -414,9 +414,9 @@ int main(int argc, char *argv[]) { pid_t pid; if (pa_pid_file_check_running(&pid) < 0) { - pa_log_info(__FILE__": daemon not running"); + pa_log_info("daemon not running"); } else { - pa_log_info(__FILE__": daemon running as PID %u", pid); + pa_log_info("daemon running as PID %u", pid); retval = 0; } @@ -426,7 +426,7 @@ int main(int argc, char *argv[]) { case PA_CMD_KILL: if (pa_pid_file_kill(SIGINT, NULL) < 0) - pa_log(__FILE__": failed to kill daemon."); + pa_log("failed to kill daemon."); else retval = 0; @@ -437,9 +437,9 @@ int main(int argc, char *argv[]) { } if (real_root && !conf->system_instance) { - pa_log_warn(__FILE__": This program is not intended to be run as root (unless --system is specified)."); + pa_log_warn("This program is not intended to be run as root (unless --system is specified)."); } else if (!real_root && conf->system_instance) { - pa_log(__FILE__": Root priviliges required."); + pa_log("Root priviliges required."); goto finish; } @@ -448,18 +448,18 @@ int main(int argc, char *argv[]) { int tty_fd; if (pa_stdio_acquire() < 0) { - pa_log(__FILE__": failed to acquire stdio."); + pa_log("failed to acquire stdio."); goto finish; } #ifdef HAVE_FORK if (pipe(daemon_pipe) < 0) { - pa_log(__FILE__": failed to create pipe."); + pa_log("failed to create pipe."); goto finish; } if ((child = fork()) < 0) { - pa_log(__FILE__": fork() failed: %s", pa_cstrerror(errno)); + pa_log("fork() failed: %s", pa_cstrerror(errno)); goto finish; } @@ -470,14 +470,14 @@ int main(int argc, char *argv[]) { daemon_pipe[1] = -1; if (pa_loop_read(daemon_pipe[0], &retval, sizeof(retval), NULL) != sizeof(retval)) { - pa_log(__FILE__": read() failed: %s", pa_cstrerror(errno)); + pa_log("read() failed: %s", pa_cstrerror(errno)); retval = 1; } if (retval) - pa_log(__FILE__": daemon startup failed."); + pa_log("daemon startup failed."); else - pa_log_info(__FILE__": daemon startup successful."); + pa_log_info("daemon startup successful."); goto finish; } @@ -537,7 +537,7 @@ int main(int argc, char *argv[]) { if (conf->use_pid_file) { if (pa_pid_file_create() < 0) { - pa_log(__FILE__": pa_pid_file_create() failed."); + pa_log("pa_pid_file_create() failed."); #ifdef HAVE_FORK if (conf->daemonize) pa_loop_write(daemon_pipe[1], &retval, sizeof(retval), NULL); @@ -604,13 +604,13 @@ int main(int argc, char *argv[]) { pa_xfree(s); if (r < 0 && conf->fail) { - pa_log(__FILE__": failed to initialize daemon."); + pa_log("failed to initialize daemon."); #ifdef HAVE_FORK if (conf->daemonize) pa_loop_write(daemon_pipe[1], &retval, sizeof(retval), NULL); #endif } else if (!c->modules || pa_idxset_size(c->modules) == 0) { - pa_log(__FILE__": daemon startup without any loaded modules, refusing to work."); + pa_log("daemon startup without any loaded modules, refusing to work."); #ifdef HAVE_FORK if (conf->daemonize) pa_loop_write(daemon_pipe[1], &retval, sizeof(retval), NULL); @@ -634,10 +634,10 @@ int main(int argc, char *argv[]) { pa_log_error("%s : Fatal error. Default sink name (%s) does not exist in name register.", __FILE__, c->default_sink_name); retval = 1; } else { - pa_log_info(__FILE__": Daemon startup complete."); + pa_log_info("Daemon startup complete."); if (pa_mainloop_run(mainloop, &retval) < 0) retval = 1; - pa_log_info(__FILE__": Daemon shutdown initiated."); + pa_log_info("Daemon shutdown initiated."); } } @@ -653,7 +653,7 @@ int main(int argc, char *argv[]) { pa_signal_done(); pa_mainloop_free(mainloop); - pa_log_info(__FILE__": Daemon terminated."); + pa_log_info("Daemon terminated."); finish: diff --git a/src/modules/alsa-util.c b/src/modules/alsa-util.c index 39ddbfe9..d8b6c5cc 100644 --- a/src/modules/alsa-util.c +++ b/src/modules/alsa-util.c @@ -88,7 +88,7 @@ static void io_cb(pa_mainloop_api*a, pa_io_event* e, PA_GCC_UNUSED int fd, pa_io err = snd_mixer_poll_descriptors_revents(fdl->mixer, fdl->work_fds, fdl->num_fds, &revents); if (err < 0) { - pa_log_error(__FILE__": Unable to get poll revent: %s", + pa_log_error("Unable to get poll revent: %s", snd_strerror(err)); return; } @@ -135,7 +135,7 @@ static void defer_cb(pa_mainloop_api*a, PA_GCC_UNUSED pa_defer_event* e, void *u err = snd_mixer_poll_descriptors(fdl->mixer, fdl->work_fds, num_fds); if (err < 0) { - pa_log_error(__FILE__": Unable to get poll descriptors: %s", + pa_log_error("Unable to get poll descriptors: %s", snd_strerror(err)); return; } @@ -343,7 +343,7 @@ int pa_alsa_set_hw_params(snd_pcm_t *pcm_handle, pa_sample_spec *ss, uint32_t *p goto finish; if (ss->rate != r) { - pa_log_warn(__FILE__": device doesn't support %u Hz, changed to %u Hz.", ss->rate, r); + pa_log_warn("device doesn't support %u Hz, changed to %u Hz.", ss->rate, r); /* If the sample rate deviates too much, we need to resample */ if (r < ss->rate*.95 || r > ss->rate*1.05) @@ -351,12 +351,12 @@ int pa_alsa_set_hw_params(snd_pcm_t *pcm_handle, pa_sample_spec *ss, uint32_t *p } if (ss->channels != c) { - pa_log_warn(__FILE__": device doesn't support %u channels, changed to %u.", ss->channels, c); + pa_log_warn("device doesn't support %u channels, changed to %u.", ss->channels, c); ss->channels = c; } if (ss->format != f) { - pa_log_warn(__FILE__": device doesn't support sample format %s, changed to %s.", pa_sample_format_to_string(ss->format), pa_sample_format_to_string(f)); + pa_log_warn("device doesn't support sample format %s, changed to %s.", pa_sample_format_to_string(ss->format), pa_sample_format_to_string(f)); ss->format = f; } @@ -387,17 +387,17 @@ int pa_alsa_prepare_mixer(snd_mixer_t *mixer, const char *dev) { assert(mixer && dev); if ((err = snd_mixer_attach(mixer, dev)) < 0) { - pa_log_warn(__FILE__": Unable to attach to mixer %s: %s", dev, snd_strerror(err)); + pa_log_warn("Unable to attach to mixer %s: %s", dev, snd_strerror(err)); return -1; } if ((err = snd_mixer_selem_register(mixer, NULL, NULL)) < 0) { - pa_log_warn(__FILE__": Unable to register mixer: %s", snd_strerror(err)); + pa_log_warn("Unable to register mixer: %s", snd_strerror(err)); return -1; } if ((err = snd_mixer_load(mixer)) < 0) { - pa_log_warn(__FILE__": Unable to load mixer: %s", snd_strerror(err)); + pa_log_warn("Unable to load mixer: %s", snd_strerror(err)); return -1; } @@ -415,18 +415,18 @@ snd_mixer_elem_t *pa_alsa_find_elem(snd_mixer_t *mixer, const char *name, const snd_mixer_selem_id_set_name(sid, name); if (!(elem = snd_mixer_find_selem(mixer, sid))) { - pa_log_warn(__FILE__": Cannot find mixer control \"%s\".", snd_mixer_selem_id_get_name(sid)); + pa_log_warn("Cannot find mixer control \"%s\".", snd_mixer_selem_id_get_name(sid)); if (fallback) { snd_mixer_selem_id_set_name(sid, fallback); if (!(elem = snd_mixer_find_selem(mixer, sid))) - pa_log_warn(__FILE__": Cannot find fallback mixer control \"%s\".", snd_mixer_selem_id_get_name(sid)); + pa_log_warn("Cannot find fallback mixer control \"%s\".", snd_mixer_selem_id_get_name(sid)); } } if (elem) - pa_log_info(__FILE__": Using mixer control \"%s\".", snd_mixer_selem_id_get_name(sid)); + pa_log_info("Using mixer control \"%s\".", snd_mixer_selem_id_get_name(sid)); return elem; } diff --git a/src/modules/dbus-util.c b/src/modules/dbus-util.c index e4bd2c3e..165ccff6 100644 --- a/src/modules/dbus-util.c +++ b/src/modules/dbus-util.c @@ -93,7 +93,7 @@ static void handle_io_event(PA_GCC_UNUSED pa_mainloop_api *ea, pa_io_event *e, assert(fd == dbus_watch_get_fd(watch)); if (!dbus_watch_get_enabled(watch)) { - pa_log_warn(__FILE__": Asked to handle disabled watch: %p %i", + pa_log_warn("Asked to handle disabled watch: %p %i", (void *) watch, fd); return; } diff --git a/src/modules/gconf/module-gconf.c b/src/modules/gconf/module-gconf.c index a61295e0..d9f649fd 100644 --- a/src/modules/gconf/module-gconf.c +++ b/src/modules/gconf/module-gconf.c @@ -96,7 +96,7 @@ static int fill_buf(struct userdata *u) { assert(u); if (u->buf_fill >= BUF_MAX) { - pa_log(__FILE__": read buffer overflow"); + pa_log("read buffer overflow"); return -1; } @@ -148,7 +148,7 @@ static void unload_one_module(struct userdata *u, struct module_info*m, unsigned if (m->items[i].index == PA_INVALID_INDEX) return; - pa_log_debug(__FILE__": Unloading module #%i", m->items[i].index); + pa_log_debug("Unloading module #%i", m->items[i].index); pa_module_unload_by_index(u->core, m->items[i].index); m->items[i].index = PA_INVALID_INDEX; pa_xfree(m->items[i].name); @@ -192,14 +192,14 @@ static void load_module( unload_one_module(u, m, i); } - pa_log_debug(__FILE__": Loading module '%s' with args '%s' due to GConf configuration.", name, args); + pa_log_debug("Loading module '%s' with args '%s' due to GConf configuration.", name, args); m->items[i].name = pa_xstrdup(name); m->items[i].args = pa_xstrdup(args); m->items[i].index = PA_INVALID_INDEX; if (!(mod = pa_module_load(u->core, name, args))) { - pa_log(__FILE__": pa_module_load() failed"); + pa_log("pa_module_load() failed"); return; } @@ -308,7 +308,7 @@ static int handle_event(struct userdata *u) { return ret; fail: - pa_log(__FILE__": Unable to read or parse data from client."); + pa_log("Unable to read or parse data from client."); return -1; } @@ -337,12 +337,12 @@ static int start_client(const char *n, pid_t *pid) { int pipe_fds[2] = { -1, -1 }; if (pipe(pipe_fds) < 0) { - pa_log(__FILE__": pipe() failed: %s", pa_cstrerror(errno)); + pa_log("pipe() failed: %s", pa_cstrerror(errno)); goto fail; } if ((child = fork()) == (pid_t) -1) { - pa_log(__FILE__": fork() failed: %s", pa_cstrerror(errno)); + pa_log("fork() failed: %s", pa_cstrerror(errno)); goto fail; } else if (child != 0) { diff --git a/src/modules/module-alsa-sink.c b/src/modules/module-alsa-sink.c index 0cebd50f..6ff9a6e4 100644 --- a/src/modules/module-alsa-sink.c +++ b/src/modules/module-alsa-sink.c @@ -125,10 +125,10 @@ static int xrun_recovery(struct userdata *u) { int ret; assert(u); - pa_log_info(__FILE__": *** ALSA-XRUN (playback) ***"); + pa_log_info("*** ALSA-XRUN (playback) ***"); if ((ret = snd_pcm_prepare(u->pcm_handle)) < 0) { - pa_log(__FILE__": snd_pcm_prepare() failed: %s", snd_strerror(-ret)); + pa_log("snd_pcm_prepare() failed: %s", snd_strerror(-ret)); clear_up(u); pa_module_unload_request(u->module); @@ -169,7 +169,7 @@ static void do_write(struct userdata *u) { continue; } - pa_log(__FILE__": snd_pcm_writei() failed: %s", snd_strerror(-frames)); + pa_log("snd_pcm_writei() failed: %s", snd_strerror(-frames)); clear_up(u); pa_module_unload_request(u->module); @@ -233,7 +233,7 @@ static pa_usec_t sink_get_latency_cb(pa_sink *s) { assert(s && u && u->sink); if ((err = snd_pcm_delay(u->pcm_handle, &frames)) < 0) { - pa_log(__FILE__": failed to get delay: %s", snd_strerror(err)); + pa_log("failed to get delay: %s", snd_strerror(err)); s->get_latency = NULL; return 0; } @@ -275,7 +275,7 @@ static int sink_get_hw_volume_cb(pa_sink *s) { return 0; fail: - pa_log_error(__FILE__": Unable to read volume: %s", snd_strerror(err)); + pa_log_error("Unable to read volume: %s", snd_strerror(err)); s->get_hw_volume = NULL; s->set_hw_volume = NULL; return -1; @@ -309,7 +309,7 @@ static int sink_set_hw_volume_cb(pa_sink *s) { return 0; fail: - pa_log_error(__FILE__": Unable to set volume: %s", snd_strerror(err)); + pa_log_error("Unable to set volume: %s", snd_strerror(err)); s->get_hw_volume = NULL; s->set_hw_volume = NULL; return -1; @@ -323,7 +323,7 @@ static int sink_get_hw_mute_cb(pa_sink *s) { err = snd_mixer_selem_get_playback_switch(u->mixer_elem, 0, &sw); if (err) { - pa_log_error(__FILE__": Unable to get switch: %s", snd_strerror(err)); + pa_log_error("Unable to get switch: %s", snd_strerror(err)); s->get_hw_mute = NULL; s->set_hw_mute = NULL; return -1; @@ -342,7 +342,7 @@ static int sink_set_hw_mute_cb(pa_sink *s) { err = snd_mixer_selem_set_playback_switch_all(u->mixer_elem, !s->hw_muted); if (err) { - pa_log_error(__FILE__": Unable to set switch: %s", snd_strerror(err)); + pa_log_error("Unable to set switch: %s", snd_strerror(err)); s->get_hw_mute = NULL; s->set_hw_mute = NULL; return -1; @@ -369,13 +369,13 @@ int pa__init(pa_core *c, pa_module*m) { int namereg_fail; if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments"); + pa_log("failed to parse module arguments"); goto fail; } ss = c->default_sample_spec; if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_ALSA) < 0) { - pa_log(__FILE__": failed to parse sample specification and channel map"); + pa_log("failed to parse sample specification and channel map"); goto fail; } @@ -386,7 +386,7 @@ int pa__init(pa_core *c, pa_module*m) { fragsize = pa_bytes_per_second(&ss)/128; if (pa_modargs_get_value_u32(ma, "fragments", &periods) < 0 || pa_modargs_get_value_u32(ma, "fragment_size", &fragsize) < 0) { - pa_log(__FILE__": failed to parse buffer metrics"); + pa_log("failed to parse buffer metrics"); goto fail; } period_size = fragsize/frame_size; @@ -397,18 +397,18 @@ int pa__init(pa_core *c, pa_module*m) { snd_config_update_free_global(); if ((err = snd_pcm_open(&u->pcm_handle, dev = pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) < 0) { - pa_log(__FILE__": Error opening PCM device %s: %s", dev, snd_strerror(err)); + pa_log("Error opening PCM device %s: %s", dev, snd_strerror(err)); goto fail; } if ((err = snd_pcm_info_malloc(&pcm_info)) < 0 || (err = snd_pcm_info(u->pcm_handle, pcm_info)) < 0) { - pa_log(__FILE__": Error fetching PCM info: %s", snd_strerror(err)); + pa_log("Error fetching PCM info: %s", snd_strerror(err)); goto fail; } if ((err = pa_alsa_set_hw_params(u->pcm_handle, &ss, &periods, &period_size)) < 0) { - pa_log(__FILE__": Failed to set hardware parameters: %s", snd_strerror(err)); + pa_log("Failed to set hardware parameters: %s", snd_strerror(err)); goto fail; } @@ -417,7 +417,7 @@ int pa__init(pa_core *c, pa_module*m) { pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_ALSA); if ((err = snd_mixer_open(&u->mixer_handle, 0)) < 0) { - pa_log(__FILE__": Error opening mixer: %s", snd_strerror(err)); + pa_log("Error opening mixer: %s", snd_strerror(err)); goto fail; } @@ -435,7 +435,7 @@ int pa__init(pa_core *c, pa_module*m) { } if (!(u->sink = pa_sink_new(c, __FILE__, name, namereg_fail, &ss, &map))) { - pa_log(__FILE__": Failed to create sink object"); + pa_log("Failed to create sink object"); goto fail; } @@ -471,7 +471,7 @@ int pa__init(pa_core *c, pa_module*m) { u->pcm_fdl = pa_alsa_fdlist_new(); assert(u->pcm_fdl); if (pa_alsa_fdlist_init_pcm(u->pcm_fdl, u->pcm_handle, c->mainloop, fdl_callback, u) < 0) { - pa_log(__FILE__": failed to initialise file descriptor monitoring"); + pa_log("failed to initialise file descriptor monitoring"); goto fail; } @@ -479,7 +479,7 @@ int pa__init(pa_core *c, pa_module*m) { u->mixer_fdl = pa_alsa_fdlist_new(); assert(u->mixer_fdl); if (pa_alsa_fdlist_init_mixer(u->mixer_fdl, u->mixer_handle, c->mainloop) < 0) { - pa_log(__FILE__": failed to initialise file descriptor monitoring"); + pa_log("failed to initialise file descriptor monitoring"); goto fail; } snd_mixer_elem_set_callback(u->mixer_elem, mixer_callback); @@ -490,7 +490,7 @@ int pa__init(pa_core *c, pa_module*m) { u->frame_size = frame_size; u->fragment_size = period_size * frame_size; - pa_log_info(__FILE__": using %u fragments of size %lu bytes.", periods, (long unsigned)u->fragment_size); + pa_log_info("using %u fragments of size %lu bytes.", periods, (long unsigned)u->fragment_size); u->silence.memblock = pa_memblock_new(c->mempool, u->silence.length = u->fragment_size); assert(u->silence.memblock); diff --git a/src/modules/module-alsa-source.c b/src/modules/module-alsa-source.c index c3979df1..aa0666f1 100644 --- a/src/modules/module-alsa-source.c +++ b/src/modules/module-alsa-source.c @@ -126,10 +126,10 @@ static int xrun_recovery(struct userdata *u) { int ret; assert(u); - pa_log_info(__FILE__": *** ALSA-XRUN (capture) ***"); + pa_log_info("*** ALSA-XRUN (capture) ***"); if ((ret = snd_pcm_prepare(u->pcm_handle)) < 0) { - pa_log(__FILE__": snd_pcm_prepare() failed: %s", snd_strerror(-ret)); + pa_log("snd_pcm_prepare() failed: %s", snd_strerror(-ret)); clear_up(u); pa_module_unload_request(u->module); @@ -172,7 +172,7 @@ static void do_read(struct userdata *u) { continue; } - pa_log(__FILE__": snd_pcm_readi() failed: %s", snd_strerror(-frames)); + pa_log("snd_pcm_readi() failed: %s", snd_strerror(-frames)); clear_up(u); pa_module_unload_request(u->module); @@ -238,7 +238,7 @@ static pa_usec_t source_get_latency_cb(pa_source *s) { assert(s && u && u->source); if (snd_pcm_delay(u->pcm_handle, &frames) < 0) { - pa_log(__FILE__": failed to get delay"); + pa_log("failed to get delay"); s->get_latency = NULL; return 0; } @@ -272,7 +272,7 @@ static int source_get_hw_volume_cb(pa_source *s) { return 0; fail: - pa_log_error(__FILE__": Unable to read volume: %s", snd_strerror(err)); + pa_log_error("Unable to read volume: %s", snd_strerror(err)); s->get_hw_volume = NULL; s->set_hw_volume = NULL; return -1; @@ -303,7 +303,7 @@ static int source_set_hw_volume_cb(pa_source *s) { return 0; fail: - pa_log_error(__FILE__": Unable to set volume: %s", snd_strerror(err)); + pa_log_error("Unable to set volume: %s", snd_strerror(err)); s->get_hw_volume = NULL; s->set_hw_volume = NULL; return -1; @@ -317,7 +317,7 @@ static int source_get_hw_mute_cb(pa_source *s) { err = snd_mixer_selem_get_capture_switch(u->mixer_elem, 0, &sw); if (err) { - pa_log_error(__FILE__": Unable to get switch: %s", snd_strerror(err)); + pa_log_error("Unable to get switch: %s", snd_strerror(err)); s->get_hw_mute = NULL; s->set_hw_mute = NULL; return -1; @@ -336,7 +336,7 @@ static int source_set_hw_mute_cb(pa_source *s) { err = snd_mixer_selem_set_capture_switch_all(u->mixer_elem, !s->hw_muted); if (err) { - pa_log_error(__FILE__": Unable to set switch: %s", snd_strerror(err)); + pa_log_error("Unable to set switch: %s", snd_strerror(err)); s->get_hw_mute = NULL; s->set_hw_mute = NULL; return -1; @@ -363,13 +363,13 @@ int pa__init(pa_core *c, pa_module*m) { int namereg_fail; if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments"); + pa_log("failed to parse module arguments"); goto fail; } ss = c->default_sample_spec; if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_ALSA) < 0) { - pa_log(__FILE__": failed to parse sample specification"); + pa_log("failed to parse sample specification"); goto fail; } @@ -380,7 +380,7 @@ int pa__init(pa_core *c, pa_module*m) { fragsize = pa_bytes_per_second(&ss)/128; if (pa_modargs_get_value_u32(ma, "fragments", &periods) < 0 || pa_modargs_get_value_u32(ma, "fragment_size", &fragsize) < 0) { - pa_log(__FILE__": failed to parse buffer metrics"); + pa_log("failed to parse buffer metrics"); goto fail; } period_size = fragsize/frame_size; @@ -391,18 +391,18 @@ int pa__init(pa_core *c, pa_module*m) { snd_config_update_free_global(); if ((err = snd_pcm_open(&u->pcm_handle, dev = pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK)) < 0) { - pa_log(__FILE__": Error opening PCM device %s: %s", dev, snd_strerror(err)); + pa_log("Error opening PCM device %s: %s", dev, snd_strerror(err)); goto fail; } if ((err = snd_pcm_info_malloc(&pcm_info)) < 0 || (err = snd_pcm_info(u->pcm_handle, pcm_info)) < 0) { - pa_log(__FILE__": Error fetching PCM info: %s", snd_strerror(err)); + pa_log("Error fetching PCM info: %s", snd_strerror(err)); goto fail; } if ((err = pa_alsa_set_hw_params(u->pcm_handle, &ss, &periods, &period_size)) < 0) { - pa_log(__FILE__": Failed to set hardware parameters: %s", snd_strerror(err)); + pa_log("Failed to set hardware parameters: %s", snd_strerror(err)); goto fail; } @@ -411,7 +411,7 @@ int pa__init(pa_core *c, pa_module*m) { pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_ALSA); if ((err = snd_mixer_open(&u->mixer_handle, 0)) < 0) { - pa_log(__FILE__": Error opening mixer: %s", snd_strerror(err)); + pa_log("Error opening mixer: %s", snd_strerror(err)); goto fail; } @@ -429,7 +429,7 @@ int pa__init(pa_core *c, pa_module*m) { } if (!(u->source = pa_source_new(c, __FILE__, name, namereg_fail, &ss, &map))) { - pa_log(__FILE__": Failed to create source object"); + pa_log("Failed to create source object"); goto fail; } @@ -465,7 +465,7 @@ int pa__init(pa_core *c, pa_module*m) { u->pcm_fdl = pa_alsa_fdlist_new(); assert(u->pcm_fdl); if (pa_alsa_fdlist_init_pcm(u->pcm_fdl, u->pcm_handle, c->mainloop, fdl_callback, u) < 0) { - pa_log(__FILE__": failed to initialise file descriptor monitoring"); + pa_log("failed to initialise file descriptor monitoring"); goto fail; } @@ -473,7 +473,7 @@ int pa__init(pa_core *c, pa_module*m) { u->mixer_fdl = pa_alsa_fdlist_new(); assert(u->mixer_fdl); if (pa_alsa_fdlist_init_mixer(u->mixer_fdl, u->mixer_handle, c->mainloop) < 0) { - pa_log(__FILE__": failed to initialise file descriptor monitoring"); + pa_log("failed to initialise file descriptor monitoring"); goto fail; } snd_mixer_elem_set_callback(u->mixer_elem, mixer_callback); @@ -484,7 +484,7 @@ int pa__init(pa_core *c, pa_module*m) { u->frame_size = frame_size; u->fragment_size = period_size * frame_size; - pa_log_info(__FILE__": using %u fragments of size %lu bytes.", periods, (long unsigned) u->fragment_size); + pa_log_info("using %u fragments of size %lu bytes.", periods, (long unsigned) u->fragment_size); u->memchunk.memblock = NULL; u->memchunk.index = u->memchunk.length = 0; diff --git a/src/modules/module-cli.c b/src/modules/module-cli.c index 2eef5c46..d5374838 100644 --- a/src/modules/module-cli.c +++ b/src/modules/module-cli.c @@ -73,22 +73,22 @@ int pa__init(pa_core *c, pa_module*m) { assert(m); if (c->running_as_daemon) { - pa_log_info(__FILE__": Running as daemon, refusing to load this module."); + pa_log_info("Running as daemon, refusing to load this module."); return 0; } if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments."); + pa_log("failed to parse module arguments."); goto fail; } if (pa_modargs_get_value_boolean(ma, "exit_on_eof", &exit_on_eof) < 0) { - pa_log(__FILE__": exit_on_eof= expects boolean argument."); + pa_log("exit_on_eof= expects boolean argument."); goto fail; } if (pa_stdio_acquire() < 0) { - pa_log(__FILE__": STDIN/STDUSE already in use."); + pa_log("STDIN/STDUSE already in use."); goto fail; } diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c index 5243975b..217fdae6 100644 --- a/src/modules/module-combine.c +++ b/src/modules/module-combine.c @@ -124,7 +124,7 @@ static void adjust_rates(struct userdata *u) { target_latency = max_sink_latency > min_total_latency ? max_sink_latency : min_total_latency; - pa_log_info(__FILE__": [%s] target latency is %0.0f usec.", u->sink->name, (float) target_latency); + pa_log_info("[%s] target latency is %0.0f usec.", u->sink->name, (float) target_latency); base_rate = u->sink->sample_spec.rate; @@ -137,9 +137,9 @@ static void adjust_rates(struct userdata *u) { r += (uint32_t) (((((double) o->total_latency - target_latency))/u->adjust_time)*r/ 1000000); if (r < (uint32_t) (base_rate*0.9) || r > (uint32_t) (base_rate*1.1)) - pa_log_warn(__FILE__": [%s] sample rates too different, not adjusting (%u vs. %u).", o->sink_input->name, base_rate, r); + pa_log_warn("[%s] sample rates too different, not adjusting (%u vs. %u).", o->sink_input->name, base_rate, r); else { - pa_log_info(__FILE__": [%s] new rate is %u Hz; ratio is %0.3f; latency is %0.0f usec.", o->sink_input->name, r, (double) r / base_rate, (float) o->total_latency); + pa_log_info("[%s] new rate is %u Hz; ratio is %0.3f; latency is %0.0f usec.", o->sink_input->name, r, (double) r / base_rate, (float) o->total_latency); pa_sink_input_set_rate(o->sink_input, r); } } @@ -323,13 +323,13 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments"); + pa_log("failed to parse module arguments"); goto fail; } if ((rm = pa_modargs_get_value(ma, "resample_method", NULL))) { if ((resample_method = pa_parse_resample_method(rm)) < 0) { - pa_log(__FILE__": invalid resample method '%s'", rm); + pa_log("invalid resample method '%s'", rm); goto fail; } } @@ -346,23 +346,23 @@ int pa__init(pa_core *c, pa_module*m) { PA_LLIST_HEAD_INIT(struct output, u->outputs); if (pa_modargs_get_value_u32(ma, "adjust_time", &u->adjust_time) < 0) { - pa_log(__FILE__": failed to parse adjust_time value"); + pa_log("failed to parse adjust_time value"); goto fail; } if (!(master_name = pa_modargs_get_value(ma, "master", NULL)) || !(slaves = pa_modargs_get_value(ma, "slaves", NULL))) { - pa_log(__FILE__": no master or slave sinks specified"); + pa_log("no master or slave sinks specified"); goto fail; } if (!(master_sink = pa_namereg_get(c, master_name, PA_NAMEREG_SINK, 1))) { - pa_log(__FILE__": invalid master sink '%s'", master_name); + pa_log("invalid master sink '%s'", master_name); goto fail; } ss = master_sink->sample_spec; if ((pa_modargs_get_sample_spec(ma, &ss) < 0)) { - pa_log(__FILE__": invalid sample specification."); + pa_log("invalid sample specification."); goto fail; } @@ -372,17 +372,17 @@ int pa__init(pa_core *c, pa_module*m) { pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_DEFAULT); if ((pa_modargs_get_channel_map(ma, &map) < 0)) { - pa_log(__FILE__": invalid channel map."); + pa_log("invalid channel map."); goto fail; } if (ss.channels != map.channels) { - pa_log(__FILE__": channel map and sample specification don't match."); + pa_log("channel map and sample specification don't match."); goto fail; } if (!(u->sink = pa_sink_new(c, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map))) { - pa_log(__FILE__": failed to create sink"); + pa_log("failed to create sink"); goto fail; } @@ -392,7 +392,7 @@ int pa__init(pa_core *c, pa_module*m) { u->sink->userdata = u; if (!(u->master = output_new(u, master_sink, resample_method))) { - pa_log(__FILE__": failed to create master sink input on sink '%s'.", u->sink->name); + pa_log("failed to create master sink input on sink '%s'.", u->sink->name); goto fail; } @@ -401,20 +401,20 @@ int pa__init(pa_core *c, pa_module*m) { pa_sink *slave_sink; if (!(slave_sink = pa_namereg_get(c, n, PA_NAMEREG_SINK, 1))) { - pa_log(__FILE__": invalid slave sink '%s'", n); + pa_log("invalid slave sink '%s'", n); goto fail; } pa_xfree(n); if (!output_new(u, slave_sink, resample_method)) { - pa_log(__FILE__": failed to create slave sink input on sink '%s'.", slave_sink->name); + pa_log("failed to create slave sink input on sink '%s'.", slave_sink->name); goto fail; } } if (u->n_outputs <= 1) - pa_log_warn(__FILE__": WARNING: no slave sinks specified."); + pa_log_warn("WARNING: no slave sinks specified."); if (u->adjust_time > 0) { pa_gettimeofday(&tv); diff --git a/src/modules/module-detect.c b/src/modules/module-detect.c index ebafa10d..84ccd14c 100644 --- a/src/modules/module-detect.c +++ b/src/modules/module-detect.c @@ -57,7 +57,7 @@ static int detect_alsa(pa_core *c, int just_one) { if (!(f = fopen("/proc/asound/devices", "r"))) { if (errno != ENOENT) - pa_log_error(__FILE__": open(\"/proc/asound/devices\") failed: %s", pa_cstrerror(errno)); + pa_log_error("open(\"/proc/asound/devices\") failed: %s", pa_cstrerror(errno)); return -1; } @@ -120,7 +120,7 @@ static int detect_oss(pa_core *c, int just_one) { !(f = fopen("/proc/asound/oss/sndstat", "r"))) { if (errno != ENOENT) - pa_log_error(__FILE__": failed to open OSS sndstat device: %s", pa_cstrerror(errno)); + pa_log_error("failed to open OSS sndstat device: %s", pa_cstrerror(errno)); return -1; } @@ -182,7 +182,7 @@ static int detect_solaris(pa_core *c, int just_one) { if (stat(dev, &s) < 0) { if (errno != ENOENT) - pa_log_error(__FILE__": failed to open device %s: %s", dev, pa_cstrerror(errno)); + pa_log_error("failed to open device %s: %s", dev, pa_cstrerror(errno)); return -1; } @@ -224,12 +224,12 @@ int pa__init(pa_core *c, pa_module*m) { assert(m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": Failed to parse module arguments"); + pa_log("Failed to parse module arguments"); goto fail; } if (pa_modargs_get_value_boolean(ma, "just-one", &just_one) < 0) { - pa_log(__FILE__": just_one= expects a boolean argument."); + pa_log("just_one= expects a boolean argument."); goto fail; } @@ -246,11 +246,11 @@ int pa__init(pa_core *c, pa_module*m) { if ((n = detect_waveout(c, just_one)) <= 0) #endif { - pa_log_warn(__FILE__": failed to detect any sound hardware."); + pa_log_warn("failed to detect any sound hardware."); goto fail; } - pa_log_info(__FILE__": loaded %i modules.", n); + pa_log_info("loaded %i modules.", n); /* We were successful and can unload ourselves now. */ pa_module_unload_request(m); diff --git a/src/modules/module-esound-compat-spawnfd.c b/src/modules/module-esound-compat-spawnfd.c index 54e090e4..263e81f9 100644 --- a/src/modules/module-esound-compat-spawnfd.c +++ b/src/modules/module-esound-compat-spawnfd.c @@ -55,12 +55,12 @@ int pa__init(pa_core *c, pa_module*m) { if (!(ma = pa_modargs_new(m->argument, valid_modargs)) || pa_modargs_get_value_s32(ma, "fd", &fd) < 0 || fd < 0) { - pa_log(__FILE__": Failed to parse module arguments"); + pa_log("Failed to parse module arguments"); goto finish; } if (pa_loop_write(fd, &x, sizeof(x), NULL) != sizeof(x)) - pa_log(__FILE__": WARNING: write(%u, 1, 1) failed: %s", fd, pa_cstrerror(errno)); + pa_log("WARNING: write(%u, 1, 1) failed: %s", fd, pa_cstrerror(errno)); close(fd); diff --git a/src/modules/module-esound-compat-spawnpid.c b/src/modules/module-esound-compat-spawnpid.c index 3108baf7..7a662c2d 100644 --- a/src/modules/module-esound-compat-spawnpid.c +++ b/src/modules/module-esound-compat-spawnpid.c @@ -55,12 +55,12 @@ int pa__init(pa_core *c, pa_module*m) { if (!(ma = pa_modargs_new(m->argument, valid_modargs)) || pa_modargs_get_value_u32(ma, "pid", &pid) < 0 || !pid) { - pa_log(__FILE__": Failed to parse module arguments"); + pa_log("Failed to parse module arguments"); goto finish; } if (kill(pid, SIGUSR1) < 0) - pa_log(__FILE__": WARNING: kill(%u) failed: %s", pid, pa_cstrerror(errno)); + pa_log("WARNING: kill(%u) failed: %s", pid, pa_cstrerror(errno)); pa_module_unload_request(m); diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c index c774d8c1..6d4a8489 100644 --- a/src/modules/module-esound-sink.c +++ b/src/modules/module-esound-sink.c @@ -129,7 +129,7 @@ static int do_write(struct userdata *u) { assert(u->write_index < u->write_length); if ((r = pa_iochannel_write(u->io, (uint8_t*) u->write_data + u->write_index, u->write_length - u->write_index)) <= 0) { - pa_log(__FILE__": write() failed: %s", pa_cstrerror(errno)); + pa_log("write() failed: %s", pa_cstrerror(errno)); return -1; } @@ -151,7 +151,7 @@ static int do_write(struct userdata *u) { assert(u->memchunk.memblock && u->memchunk.length); if ((r = pa_iochannel_write(u->io, (uint8_t*) u->memchunk.memblock->data + u->memchunk.index, u->memchunk.length)) < 0) { - pa_log(__FILE__": write() failed: %s", pa_cstrerror(errno)); + pa_log("write() failed: %s", pa_cstrerror(errno)); return -1; } @@ -176,7 +176,7 @@ static int handle_response(struct userdata *u) { /* Process auth data */ if (!*(int32_t*) u->read_data) { - pa_log(__FILE__": Authentication failed: %s", pa_cstrerror(errno)); + pa_log("Authentication failed: %s", pa_cstrerror(errno)); return -1; } @@ -201,7 +201,7 @@ static int handle_response(struct userdata *u) { /* Process latency info */ u->latency = (pa_usec_t) ((double) (*(int32_t*) u->read_data) * 1000000 / 44100); if (u->latency > 10000000) { - pa_log(__FILE__": WARNING! Invalid latency information received from server"); + pa_log("WARNING! Invalid latency information received from server"); u->latency = 0; } @@ -246,7 +246,7 @@ static int do_read(struct userdata *u) { assert(u->read_index < u->read_length); if ((r = pa_iochannel_read(u->io, (uint8_t*) u->read_data + u->read_index, u->read_length - u->read_index)) <= 0) { - pa_log(__FILE__": read() failed: %s", r < 0 ? pa_cstrerror(errno) : "EOF"); + pa_log("read() failed: %s", r < 0 ? pa_cstrerror(errno) : "EOF"); cancel(u); return -1; } @@ -306,7 +306,7 @@ static void on_connection(PA_GCC_UNUSED pa_socket_client *c, pa_iochannel*io, vo u->client = NULL; if (!io) { - pa_log(__FILE__": connection failed: %s", pa_cstrerror(errno)); + pa_log("connection failed: %s", pa_cstrerror(errno)); cancel(u); return; } @@ -325,19 +325,19 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments"); + pa_log("failed to parse module arguments"); goto fail; } ss = c->default_sample_spec; if (pa_modargs_get_sample_spec(ma, &ss) < 0) { - pa_log(__FILE__": invalid sample format specification"); + pa_log("invalid sample format specification"); goto fail; } if ((ss.format != PA_SAMPLE_U8 && ss.format != PA_SAMPLE_S16NE) || (ss.channels > 2)) { - pa_log(__FILE__": esound sample type support is limited to mono/stereo and U8 or S16NE sample data"); + pa_log("esound sample type support is limited to mono/stereo and U8 or S16NE sample data"); goto fail; } @@ -358,12 +358,12 @@ int pa__init(pa_core *c, pa_module*m) { u->latency = 0; if (!(u->sink = pa_sink_new(c, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, NULL))) { - pa_log(__FILE__": failed to create sink."); + pa_log("failed to create sink."); goto fail; } if (!(u->client = pa_socket_client_new_string(u->core->mainloop, p = pa_modargs_get_value(ma, "server", ESD_UNIX_SOCKET_NAME), ESD_DEFAULT_PORT))) { - pa_log(__FILE__": failed to connect to server."); + pa_log("failed to connect to server."); goto fail; } pa_socket_client_set_callback(u->client, on_connection, u); @@ -371,7 +371,7 @@ int pa__init(pa_core *c, pa_module*m) { /* Prepare the initial request */ u->write_data = pa_xmalloc(u->write_length = ESD_KEY_LEN + sizeof(int32_t)); if (pa_authkey_load_auto(pa_modargs_get_value(ma, "cookie", ".esd_auth"), u->write_data, ESD_KEY_LEN) < 0) { - pa_log(__FILE__": failed to load cookie"); + pa_log("failed to load cookie"); goto fail; } *(int32_t*) ((uint8_t*) u->write_data + ESD_KEY_LEN) = ESD_ENDIAN_KEY; diff --git a/src/modules/module-hal-detect.c b/src/modules/module-hal-detect.c index 825fa96c..8232cd38 100644 --- a/src/modules/module-hal-detect.c +++ b/src/modules/module-hal-detect.c @@ -287,11 +287,11 @@ static int hal_device_add_all(struct userdata *u, capability_t capability) assert(capability < CAP_MAX); - pa_log_info(__FILE__": Trying capability %u (%s)", capability, cap); + pa_log_info("Trying capability %u (%s)", capability, cap); dbus_error_init(&error); udis = libhal_find_device_by_capability(u->ctx, cap, &n, &error); if (dbus_error_is_set(&error)) { - pa_log_error(__FILE__": Error finding devices: %s: %s", error.name, + pa_log_error("Error finding devices: %s: %s", error.name, error.message); dbus_error_free(&error); return -1; @@ -301,7 +301,7 @@ static int hal_device_add_all(struct userdata *u, capability_t capability) for (i = 0; i < n; ++i) { r = hal_device_add(u, udis[i], &error); if (dbus_error_is_set(&error)) { - pa_log_error(__FILE__": Error adding device: %s: %s", error.name, + pa_log_error("Error adding device: %s: %s", error.name, error.message); dbus_error_free(&error); count = -1; @@ -338,7 +338,7 @@ static void device_added_time_cb(pa_mainloop_api *ea, pa_time_event *ev, hal_device_add(td->u, td->udi, &error); if (dbus_error_is_set(&error)) { - pa_log_error(__FILE__": Error adding device: %s: %s", error.name, + pa_log_error("Error adding device: %s: %s", error.name, error.message); dbus_error_free(&error); } @@ -357,12 +357,12 @@ static void device_added_cb(LibHalContext *ctx, const char *udi) struct userdata *u = (struct userdata*) libhal_ctx_get_user_data(ctx); const char* cap = get_capability_name(u->capability); - pa_log_debug(__FILE__": HAL Device added: %s", udi); + pa_log_debug("HAL Device added: %s", udi); dbus_error_init(&error); has_cap = device_has_capability(ctx, udi, cap, &error); if (dbus_error_is_set(&error)) { - pa_log_error(__FILE__": Error getting capability: %s: %s", error.name, + pa_log_error("Error getting capability: %s: %s", error.name, error.message); dbus_error_free(&error); return; @@ -388,7 +388,7 @@ static void device_removed_cb(LibHalContext* ctx, const char *udi) struct device *d; struct userdata *u = (struct userdata*) libhal_ctx_get_user_data(ctx); - pa_log_debug(__FILE__": Device removed: %s", udi); + pa_log_debug("Device removed: %s", udi); if ((d = pa_hashmap_remove(u->devices, udi))) { pa_module_unload_by_index(u->core, d->index); hal_device_free(d); @@ -456,18 +456,18 @@ static LibHalContext* pa_hal_context_new(pa_core* c, DBusConnection *conn) dbus_error_init(&error); if (!(hal_ctx = libhal_ctx_new())) { - pa_log_error(__FILE__": libhal_ctx_new() failed"); + pa_log_error("libhal_ctx_new() failed"); goto fail; } if (!libhal_ctx_set_dbus_connection(hal_ctx, conn)) { - pa_log_error(__FILE__": Error establishing DBUS connection: %s: %s", + pa_log_error("Error establishing DBUS connection: %s: %s", error.name, error.message); goto fail; } if (!libhal_ctx_init(hal_ctx, &error)) { - pa_log_error(__FILE__": Couldn't connect to hald: %s: %s", + pa_log_error("Couldn't connect to hald: %s: %s", error.name, error.message); goto fail; } @@ -496,7 +496,7 @@ int pa__init(pa_core *c, pa_module*m) { dbus_error_init(&error); if (!(conn = pa_dbus_bus_get(c, DBUS_BUS_SYSTEM, &error))) { - pa_log_error(__FILE__": Unable to contact DBUS system bus: %s: %s", + pa_log_error("Unable to contact DBUS system bus: %s: %s", error.name, error.message); dbus_error_free(&error); return -1; @@ -522,7 +522,7 @@ int pa__init(pa_core *c, pa_module*m) { if ((n = hal_device_add_all(u, CAP_OSS)) <= 0) #endif { - pa_log_warn(__FILE__": failed to detect any sound hardware."); + pa_log_warn("failed to detect any sound hardware."); userdata_free(u); return -1; } @@ -536,14 +536,14 @@ int pa__init(pa_core *c, pa_module*m) { dbus_error_init(&error); if (!libhal_device_property_watch_all(hal_ctx, &error)) { - pa_log_error(__FILE__": error monitoring device list: %s: %s", + pa_log_error("error monitoring device list: %s: %s", error.name, error.message); dbus_error_free(&error); userdata_free(u); return -1; } - pa_log_info(__FILE__": loaded %i modules.", n); + pa_log_info("loaded %i modules.", n); return 0; } diff --git a/src/modules/module-jack-sink.c b/src/modules/module-jack-sink.c index 286f6f57..47f77bab 100644 --- a/src/modules/module-jack-sink.c +++ b/src/modules/module-jack-sink.c @@ -231,7 +231,7 @@ static pa_usec_t sink_get_latency_cb(pa_sink *s) { } static void jack_error_func(const char*t) { - pa_log_warn(__FILE__": JACK error >%s<", t); + pa_log_warn("JACK error >%s<", t); } int pa__init(pa_core *c, pa_module*m) { @@ -253,12 +253,12 @@ int pa__init(pa_core *c, pa_module*m) { jack_set_error_function(jack_error_func); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments."); + pa_log("failed to parse module arguments."); goto fail; } if (pa_modargs_get_value_boolean(ma, "connect", &do_connect) < 0) { - pa_log(__FILE__": failed to parse connect= argument."); + pa_log("failed to parse connect= argument."); goto fail; } @@ -276,14 +276,14 @@ int pa__init(pa_core *c, pa_module*m) { pthread_cond_init(&u->cond, NULL); if (pipe(u->pipe_fds) < 0) { - pa_log(__FILE__": pipe() failed: %s", pa_cstrerror(errno)); + pa_log("pipe() failed: %s", pa_cstrerror(errno)); goto fail; } pa_make_nonblock_fd(u->pipe_fds[1]); if (!(u->client = jack_client_open(client_name, server_name ? JackServerName : JackNullOption, &status, server_name))) { - pa_log(__FILE__": jack_client_open() failed."); + pa_log("jack_client_open() failed."); goto fail; } @@ -297,17 +297,17 @@ int pa__init(pa_core *c, pa_module*m) { channels = c->default_sample_spec.channels; if (pa_modargs_get_value_u32(ma, "channels", &channels) < 0 || channels <= 0 || channels >= PA_CHANNELS_MAX) { - pa_log(__FILE__": failed to parse channels= argument."); + pa_log("failed to parse channels= argument."); goto fail; } pa_channel_map_init_auto(&map, channels, PA_CHANNEL_MAP_ALSA); if (pa_modargs_get_channel_map(ma, &map) < 0 || map.channels != channels) { - pa_log(__FILE__": failed to parse channel_map= argument."); + pa_log("failed to parse channel_map= argument."); goto fail; } - pa_log_info(__FILE__": Successfully connected as '%s'", jack_get_client_name(u->client)); + pa_log_info("Successfully connected as '%s'", jack_get_client_name(u->client)); ss.channels = u->channels = channels; ss.rate = jack_get_sample_rate(u->client); @@ -317,13 +317,13 @@ int pa__init(pa_core *c, pa_module*m) { for (i = 0; i < ss.channels; i++) { if (!(u->port[i] = jack_port_register(u->client, pa_channel_position_to_string(map.map[i]), JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput|JackPortIsTerminal, 0))) { - pa_log(__FILE__": jack_port_register() failed."); + pa_log("jack_port_register() failed."); goto fail; } } if (!(u->sink = pa_sink_new(c, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map))) { - pa_log(__FILE__": failed to create sink."); + pa_log("failed to create sink."); goto fail; } @@ -337,7 +337,7 @@ int pa__init(pa_core *c, pa_module*m) { jack_on_shutdown(u->client, jack_shutdown, u); if (jack_activate(u->client)) { - pa_log(__FILE__": jack_activate() failed"); + pa_log("jack_activate() failed"); goto fail; } @@ -345,14 +345,14 @@ int pa__init(pa_core *c, pa_module*m) { for (i = 0, p = ports; i < ss.channels; i++, p++) { if (!*p) { - pa_log(__FILE__": not enough physical output ports, leaving unconnected."); + pa_log("not enough physical output ports, leaving unconnected."); break; } - pa_log_info(__FILE__": connecting %s to %s", jack_port_name(u->port[i]), *p); + pa_log_info("connecting %s to %s", jack_port_name(u->port[i]), *p); if (jack_connect(u->client, jack_port_name(u->port[i]), *p)) { - pa_log(__FILE__": failed to connect %s to %s, leaving unconnected.", jack_port_name(u->port[i]), *p); + pa_log("failed to connect %s to %s, leaving unconnected.", jack_port_name(u->port[i]), *p); break; } } diff --git a/src/modules/module-jack-source.c b/src/modules/module-jack-source.c index 8e659198..62a99108 100644 --- a/src/modules/module-jack-source.c +++ b/src/modules/module-jack-source.c @@ -229,7 +229,7 @@ static pa_usec_t source_get_latency_cb(pa_source *s) { } static void jack_error_func(const char*t) { - pa_log_warn(__FILE__": JACK error >%s<", t); + pa_log_warn("JACK error >%s<", t); } int pa__init(pa_core *c, pa_module*m) { @@ -251,12 +251,12 @@ int pa__init(pa_core *c, pa_module*m) { jack_set_error_function(jack_error_func); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments."); + pa_log("failed to parse module arguments."); goto fail; } if (pa_modargs_get_value_boolean(ma, "connect", &do_connect) < 0) { - pa_log(__FILE__": failed to parse connect= argument."); + pa_log("failed to parse connect= argument."); goto fail; } @@ -274,14 +274,14 @@ int pa__init(pa_core *c, pa_module*m) { pthread_cond_init(&u->cond, NULL); if (pipe(u->pipe_fds) < 0) { - pa_log(__FILE__": pipe() failed: %s", pa_cstrerror(errno)); + pa_log("pipe() failed: %s", pa_cstrerror(errno)); goto fail; } pa_make_nonblock_fd(u->pipe_fds[1]); if (!(u->client = jack_client_open(client_name, server_name ? JackServerName : JackNullOption, &status, server_name))) { - pa_log(__FILE__": jack_client_open() failed."); + pa_log("jack_client_open() failed."); goto fail; } @@ -295,17 +295,17 @@ int pa__init(pa_core *c, pa_module*m) { channels = c->default_sample_spec.channels; if (pa_modargs_get_value_u32(ma, "channels", &channels) < 0 || channels <= 0 || channels >= PA_CHANNELS_MAX) { - pa_log(__FILE__": failed to parse channels= argument."); + pa_log("failed to parse channels= argument."); goto fail; } pa_channel_map_init_auto(&map, channels, PA_CHANNEL_MAP_ALSA); if (pa_modargs_get_channel_map(ma, &map) < 0 || map.channels != channels) { - pa_log(__FILE__": failed to parse channel_map= argument."); + pa_log("failed to parse channel_map= argument."); goto fail; } - pa_log_info(__FILE__": Successfully connected as '%s'", jack_get_client_name(u->client)); + pa_log_info("Successfully connected as '%s'", jack_get_client_name(u->client)); ss.channels = u->channels = channels; ss.rate = jack_get_sample_rate(u->client); @@ -315,13 +315,13 @@ int pa__init(pa_core *c, pa_module*m) { for (i = 0; i < ss.channels; i++) { if (!(u->port[i] = jack_port_register(u->client, pa_channel_position_to_string(map.map[i]), JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput|JackPortIsTerminal, 0))) { - pa_log(__FILE__": jack_port_register() failed."); + pa_log("jack_port_register() failed."); goto fail; } } if (!(u->source = pa_source_new(c, __FILE__, pa_modargs_get_value(ma, "source_name", DEFAULT_SOURCE_NAME), 0, &ss, &map))) { - pa_log(__FILE__": failed to create source."); + pa_log("failed to create source."); goto fail; } @@ -335,7 +335,7 @@ int pa__init(pa_core *c, pa_module*m) { jack_on_shutdown(u->client, jack_shutdown, u); if (jack_activate(u->client)) { - pa_log(__FILE__": jack_activate() failed"); + pa_log("jack_activate() failed"); goto fail; } @@ -343,14 +343,14 @@ int pa__init(pa_core *c, pa_module*m) { for (i = 0, p = ports; i < ss.channels; i++, p++) { if (!*p) { - pa_log(__FILE__": not enough physical output ports, leaving unconnected."); + pa_log("not enough physical output ports, leaving unconnected."); break; } - pa_log_info(__FILE__": connecting %s to %s", jack_port_name(u->port[i]), *p); + pa_log_info("connecting %s to %s", jack_port_name(u->port[i]), *p); if (jack_connect(u->client, *p, jack_port_name(u->port[i]))) { - pa_log(__FILE__": failed to connect %s to %s, leaving unconnected.", jack_port_name(u->port[i]), *p); + pa_log("failed to connect %s to %s, leaving unconnected.", jack_port_name(u->port[i]), *p); break; } } diff --git a/src/modules/module-lirc.c b/src/modules/module-lirc.c index a93a3b92..18b2ddf1 100644 --- a/src/modules/module-lirc.c +++ b/src/modules/module-lirc.c @@ -70,7 +70,7 @@ static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GC assert(u); if (events & (PA_IO_EVENT_HANGUP|PA_IO_EVENT_ERROR)) { - pa_log(__FILE__": lost connection to LIRC daemon."); + pa_log("lost connection to LIRC daemon."); goto fail; } @@ -78,13 +78,13 @@ static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GC char *c; if (lirc_nextcode(&code) != 0 || !code) { - pa_log(__FILE__": lirc_nextcode() failed."); + pa_log("lirc_nextcode() failed."); goto fail; } c = pa_xstrdup(code); c[strcspn(c, "\n\r")] = 0; - pa_log_debug(__FILE__": raw IR code '%s'", c); + pa_log_debug("raw IR code '%s'", c); pa_xfree(c); while (lirc_code2char(u->config, code, &name) == 0 && name) { @@ -97,7 +97,7 @@ static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GC MUTE_TOGGLE } volchange = INVALID; - pa_log_info(__FILE__": translated IR code '%s'", name); + pa_log_info("translated IR code '%s'", name); if (strcasecmp(name, "volume-up") == 0) volchange = UP; @@ -111,12 +111,12 @@ static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GC volchange = RESET; if (volchange == INVALID) - pa_log_warn(__FILE__": recieved unknown IR code '%s'", name); + pa_log_warn("recieved unknown IR code '%s'", name); else { pa_sink *s; if (!(s = pa_namereg_get(u->module->core, u->sink_name, PA_NAMEREG_SINK, 1))) - pa_log(__FILE__": failed to get sink '%s'", u->sink_name); + pa_log("failed to get sink '%s'", u->sink_name); else { int i; pa_cvolume cv = *pa_sink_get_volume(s, PA_MIXER_HARDWARE); @@ -186,12 +186,12 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (lirc_in_use) { - pa_log(__FILE__": module-lirc may no be loaded twice."); + pa_log("module-lirc may no be loaded twice."); return -1; } if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": Failed to parse module arguments"); + pa_log("Failed to parse module arguments"); goto fail; } @@ -204,12 +204,12 @@ int pa__init(pa_core *c, pa_module*m) { u->mute_toggle_save = 0; if ((u->lirc_fd = lirc_init((char*) pa_modargs_get_value(ma, "appname", "pulseaudio"), 1)) < 0) { - pa_log(__FILE__": lirc_init() failed."); + pa_log("lirc_init() failed."); goto fail; } if (lirc_readconfig((char*) pa_modargs_get_value(ma, "config", NULL), &u->config, NULL) < 0) { - pa_log(__FILE__": lirc_readconfig() failed."); + pa_log("lirc_readconfig() failed."); goto fail; } diff --git a/src/modules/module-match.c b/src/modules/module-match.c index ab94b02d..eb5de64e 100644 --- a/src/modules/module-match.c +++ b/src/modules/module-match.c @@ -83,7 +83,7 @@ static int load_rules(struct userdata *u, const char *filename) { pa_open_config_file(DEFAULT_MATCH_TABLE_FILE, DEFAULT_MATCH_TABLE_FILE_USER, NULL, &fn, "r"); if (!f) { - pa_log(__FILE__": failed to open file '%s': %s", fn, pa_cstrerror(errno)); + pa_log("failed to open file '%s': %s", fn, pa_cstrerror(errno)); goto finish; } @@ -118,7 +118,7 @@ static int load_rules(struct userdata *u, const char *filename) { *d = 0; if (pa_atou(v, &k) < 0) { - pa_log(__FILE__": [%s:%u] failed to parse volume", filename, n); + pa_log("[%s:%u] failed to parse volume", filename, n); goto finish; } @@ -126,7 +126,7 @@ static int load_rules(struct userdata *u, const char *filename) { if (regcomp(®ex, ln, REG_EXTENDED|REG_NOSUB) != 0) { - pa_log(__FILE__": [%s:%u] invalid regular expression", filename, n); + pa_log("[%s:%u] invalid regular expression", filename, n); goto finish; } @@ -176,7 +176,7 @@ static void callback(pa_core *c, pa_subscription_event_type_t t, uint32_t idx, v for (r = u->rules; r; r = r->next) { if (!regexec(&r->regex, si->name, 0, NULL, 0)) { pa_cvolume cv; - pa_log_debug(__FILE__": changing volume of sink input '%s' to 0x%03x", si->name, r->volume); + pa_log_debug("changing volume of sink input '%s' to 0x%03x", si->name, r->volume); pa_cvolume_set(&cv, r->volume, si->sample_spec.channels); pa_sink_input_set_volume(si, &cv); } @@ -189,7 +189,7 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": Failed to parse module arguments"); + pa_log("Failed to parse module arguments"); goto fail; } diff --git a/src/modules/module-mmkbd-evdev.c b/src/modules/module-mmkbd-evdev.c index c3d07396..37234d92 100644 --- a/src/modules/module-mmkbd-evdev.c +++ b/src/modules/module-mmkbd-evdev.c @@ -82,7 +82,7 @@ static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GC assert(u); if (events & (PA_IO_EVENT_HANGUP|PA_IO_EVENT_ERROR)) { - pa_log(__FILE__": lost connection to evdev device."); + pa_log("lost connection to evdev device."); goto fail; } @@ -90,14 +90,14 @@ static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GC struct input_event ev; if (pa_loop_read(u->fd, &ev, sizeof(ev), &u->fd_type) <= 0) { - pa_log(__FILE__": failed to read from event device: %s", pa_cstrerror(errno)); + pa_log("failed to read from event device: %s", pa_cstrerror(errno)); goto fail; } if (ev.type == EV_KEY && (ev.value == 1 || ev.value == 2)) { enum { INVALID, UP, DOWN, MUTE_TOGGLE } volchange = INVALID; - pa_log_debug(__FILE__": key code=%u, value=%u", ev.code, ev.value); + pa_log_debug("key code=%u, value=%u", ev.code, ev.value); switch (ev.code) { case KEY_VOLUMEDOWN: volchange = DOWN; break; @@ -109,7 +109,7 @@ static void io_callback(pa_mainloop_api *io, PA_GCC_UNUSED pa_io_event *e, PA_GC pa_sink *s; if (!(s = pa_namereg_get(u->module->core, u->sink_name, PA_NAMEREG_SINK, 1))) - pa_log(__FILE__": failed to get sink '%s'", u->sink_name); + pa_log("failed to get sink '%s'", u->sink_name); else { int i; pa_cvolume cv = *pa_sink_get_volume(s, PA_MIXER_HARDWARE); @@ -173,7 +173,7 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": Failed to parse module arguments"); + pa_log("Failed to parse module arguments"); goto fail; } @@ -185,41 +185,41 @@ int pa__init(pa_core *c, pa_module*m) { u->fd_type = 0; if ((u->fd = open(pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), O_RDONLY)) < 0) { - pa_log(__FILE__": failed to open evdev device: %s", pa_cstrerror(errno)); + pa_log("failed to open evdev device: %s", pa_cstrerror(errno)); goto fail; } if (ioctl(u->fd, EVIOCGVERSION, &version) < 0) { - pa_log(__FILE__": EVIOCGVERSION failed: %s", pa_cstrerror(errno)); + pa_log("EVIOCGVERSION failed: %s", pa_cstrerror(errno)); goto fail; } - pa_log_info(__FILE__": evdev driver version %i.%i.%i", version >> 16, (version >> 8) & 0xff, version & 0xff); + pa_log_info("evdev driver version %i.%i.%i", version >> 16, (version >> 8) & 0xff, version & 0xff); if(ioctl(u->fd, EVIOCGID, &input_id)) { - pa_log(__FILE__": EVIOCGID failed: %s", pa_cstrerror(errno)); + pa_log("EVIOCGID failed: %s", pa_cstrerror(errno)); goto fail; } - pa_log_info(__FILE__": evdev vendor 0x%04hx product 0x%04hx version 0x%04hx bustype %u", + pa_log_info("evdev vendor 0x%04hx product 0x%04hx version 0x%04hx bustype %u", input_id.vendor, input_id.product, input_id.version, input_id.bustype); memset(name, 0, sizeof(name)); if(ioctl(u->fd, EVIOCGNAME(sizeof(name)), name) < 0) { - pa_log(__FILE__": EVIOCGNAME failed: %s", pa_cstrerror(errno)); + pa_log("EVIOCGNAME failed: %s", pa_cstrerror(errno)); goto fail; } - pa_log_info(__FILE__": evdev device name: %s", name); + pa_log_info("evdev device name: %s", name); memset(evtype_bitmask, 0, sizeof(evtype_bitmask)); if (ioctl(u->fd, EVIOCGBIT(0, EV_MAX), evtype_bitmask) < 0) { - pa_log(__FILE__": EVIOCGBIT failed: %s", pa_cstrerror(errno)); + pa_log("EVIOCGBIT failed: %s", pa_cstrerror(errno)); goto fail; } if (!test_bit(EV_KEY, evtype_bitmask)) { - pa_log(__FILE__": device has no keys."); + pa_log("device has no keys."); goto fail; } diff --git a/src/modules/module-native-protocol-fd.c b/src/modules/module-native-protocol-fd.c index 9e1cac09..dd3b4abe 100644 --- a/src/modules/module-native-protocol-fd.c +++ b/src/modules/module-native-protocol-fd.c @@ -53,12 +53,12 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments."); + pa_log("failed to parse module arguments."); goto finish; } if (pa_modargs_get_value_s32(ma, "fd", &fd) < 0) { - pa_log(__FILE__": invalid file descriptor."); + pa_log("invalid file descriptor."); goto finish; } diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c index 4d5ebb08..50e58853 100644 --- a/src/modules/module-null-sink.c +++ b/src/modules/module-null-sink.c @@ -120,13 +120,13 @@ int pa__init(pa_core *c, pa_module*m) { assert(m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments."); + pa_log("failed to parse module arguments."); goto fail; } ss = c->default_sample_spec; if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_DEFAULT) < 0) { - pa_log(__FILE__": invalid sample format specification or channel map."); + pa_log("invalid sample format specification or channel map."); goto fail; } @@ -136,7 +136,7 @@ int pa__init(pa_core *c, pa_module*m) { m->userdata = u; if (!(u->sink = pa_sink_new(c, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map))) { - pa_log(__FILE__": failed to create sink."); + pa_log("failed to create sink."); goto fail; } diff --git a/src/modules/module-oss-mmap.c b/src/modules/module-oss-mmap.c index 75ab9a9e..0be6bbe2 100644 --- a/src/modules/module-oss-mmap.c +++ b/src/modules/module-oss-mmap.c @@ -187,7 +187,7 @@ static void do_write(struct userdata *u) { update_usage(u); if (ioctl(u->fd, SNDCTL_DSP_GETOPTR, &info) < 0) { - pa_log(__FILE__": SNDCTL_DSP_GETOPTR: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_GETOPTR: %s", pa_cstrerror(errno)); clear_up(u); pa_module_unload_request(u->module); @@ -253,7 +253,7 @@ static void do_read(struct userdata *u) { update_usage(u); if (ioctl(u->fd, SNDCTL_DSP_GETIPTR, &info) < 0) { - pa_log(__FILE__": SNDCTL_DSP_GETIPTR: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_GETIPTR: %s", pa_cstrerror(errno)); clear_up(u); pa_module_unload_request(u->module); @@ -293,7 +293,7 @@ static pa_usec_t sink_get_latency_cb(pa_sink *s) { assert(s && u); if (ioctl(u->fd, SNDCTL_DSP_GETOPTR, &info) < 0) { - pa_log(__FILE__": SNDCTL_DSP_GETOPTR: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_GETOPTR: %s", pa_cstrerror(errno)); return 0; } @@ -319,7 +319,7 @@ static pa_usec_t source_get_latency_cb(pa_source *s) { assert(s && u); if (ioctl(u->fd, SNDCTL_DSP_GETIPTR, &info) < 0) { - pa_log(__FILE__": SNDCTL_DSP_GETIPTR: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_GETIPTR: %s", pa_cstrerror(errno)); return 0; } @@ -342,7 +342,7 @@ static int sink_get_hw_volume(pa_sink *s) { struct userdata *u = s->userdata; if (pa_oss_get_pcm_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) { - pa_log_info(__FILE__": device doesn't support reading mixer settings: %s", pa_cstrerror(errno)); + pa_log_info("device doesn't support reading mixer settings: %s", pa_cstrerror(errno)); s->get_hw_volume = NULL; return -1; } @@ -354,7 +354,7 @@ static int sink_set_hw_volume(pa_sink *s) { struct userdata *u = s->userdata; if (pa_oss_set_pcm_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) { - pa_log_info(__FILE__": device doesn't support writing mixer settings: %s", pa_cstrerror(errno)); + pa_log_info("device doesn't support writing mixer settings: %s", pa_cstrerror(errno)); s->set_hw_volume = NULL; return -1; } @@ -366,7 +366,7 @@ static int source_get_hw_volume(pa_source *s) { struct userdata *u = s->userdata; if (pa_oss_get_input_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) { - pa_log_info(__FILE__": device doesn't support reading mixer settings: %s", pa_cstrerror(errno)); + pa_log_info("device doesn't support reading mixer settings: %s", pa_cstrerror(errno)); s->get_hw_volume = NULL; return -1; } @@ -378,7 +378,7 @@ static int source_set_hw_volume(pa_source *s) { struct userdata *u = s->userdata; if (pa_oss_set_input_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) { - pa_log_info(__FILE__": device doesn't support writing mixer settings: %s", pa_cstrerror(errno)); + pa_log_info("device doesn't support writing mixer settings: %s", pa_cstrerror(errno)); s->set_hw_volume = NULL; return -1; } @@ -410,17 +410,17 @@ int pa__init(pa_core *c, pa_module*m) { u->core = c; if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments."); + pa_log("failed to parse module arguments."); goto fail; } if (pa_modargs_get_value_boolean(ma, "record", &record) < 0 || pa_modargs_get_value_boolean(ma, "playback", &playback) < 0) { - pa_log(__FILE__": record= and playback= expect numeric arguments."); + pa_log("record= and playback= expect numeric arguments."); goto fail; } if (!playback && !record) { - pa_log(__FILE__": neither playback nor record enabled for device."); + pa_log("neither playback nor record enabled for device."); goto fail; } @@ -429,13 +429,13 @@ int pa__init(pa_core *c, pa_module*m) { nfrags = DEFAULT_NFRAGS; frag_size = DEFAULT_FRAGSIZE; if (pa_modargs_get_value_s32(ma, "fragments", &nfrags) < 0 || pa_modargs_get_value_s32(ma, "fragment_size", &frag_size) < 0) { - pa_log(__FILE__": failed to parse fragments arguments"); + pa_log("failed to parse fragments arguments"); goto fail; } u->sample_spec = c->default_sample_spec; if (pa_modargs_get_sample_spec_and_channel_map(ma, &u->sample_spec, &map, PA_CHANNEL_MAP_OSS) < 0) { - pa_log(__FILE__": failed to parse sample specification or channel map"); + pa_log("failed to parse sample specification or channel map"); goto fail; } @@ -443,14 +443,14 @@ int pa__init(pa_core *c, pa_module*m) { goto fail; if (!(caps & DSP_CAP_MMAP) || !(caps & DSP_CAP_TRIGGER)) { - pa_log(__FILE__": OSS device not mmap capable."); + pa_log("OSS device not mmap capable."); goto fail; } - pa_log_info(__FILE__": device opened in %s mode.", mode == O_WRONLY ? "O_WRONLY" : (mode == O_RDONLY ? "O_RDONLY" : "O_RDWR")); + pa_log_info("device opened in %s mode.", mode == O_WRONLY ? "O_WRONLY" : (mode == O_RDONLY ? "O_RDONLY" : "O_RDWR")); if (pa_oss_get_hw_description(p, hwdesc, sizeof(hwdesc)) >= 0) - pa_log_info(__FILE__": hardware name is '%s'.", hwdesc); + pa_log_info("hardware name is '%s'.", hwdesc); else hwdesc[0] = 0; @@ -463,19 +463,19 @@ int pa__init(pa_core *c, pa_module*m) { if (mode != O_WRONLY) { if (ioctl(u->fd, SNDCTL_DSP_GETISPACE, &info) < 0) { - pa_log(__FILE__": SNDCTL_DSP_GETISPACE: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_GETISPACE: %s", pa_cstrerror(errno)); goto fail; } - pa_log_info(__FILE__": input -- %u fragments of size %u.", info.fragstotal, info.fragsize); + pa_log_info("input -- %u fragments of size %u.", info.fragstotal, info.fragsize); u->in_mmap_length = (u->in_fragment_size = info.fragsize) * (u->in_fragments = info.fragstotal); if ((u->in_mmap = mmap(NULL, u->in_mmap_length, PROT_READ, MAP_SHARED, u->fd, 0)) == MAP_FAILED) { if (mode == O_RDWR) { - pa_log(__FILE__": mmap failed for input. Changing to O_WRONLY mode."); + pa_log("mmap failed for input. Changing to O_WRONLY mode."); mode = O_WRONLY; } else { - pa_log(__FILE__": mmap(): %s", pa_cstrerror(errno)); + pa_log("mmap(): %s", pa_cstrerror(errno)); goto fail; } } else { @@ -513,19 +513,19 @@ int pa__init(pa_core *c, pa_module*m) { if (mode != O_RDONLY) { if (ioctl(u->fd, SNDCTL_DSP_GETOSPACE, &info) < 0) { - pa_log(__FILE__": SNDCTL_DSP_GETOSPACE: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_GETOSPACE: %s", pa_cstrerror(errno)); goto fail; } - pa_log_info(__FILE__": output -- %u fragments of size %u.", info.fragstotal, info.fragsize); + pa_log_info("output -- %u fragments of size %u.", info.fragstotal, info.fragsize); u->out_mmap_length = (u->out_fragment_size = info.fragsize) * (u->out_fragments = info.fragstotal); if ((u->out_mmap = mmap(NULL, u->out_mmap_length, PROT_WRITE, MAP_SHARED, u->fd, 0)) == MAP_FAILED) { if (mode == O_RDWR) { - pa_log(__FILE__": mmap filed for output. Changing to O_RDONLY mode."); + pa_log("mmap filed for output. Changing to O_RDONLY mode."); mode = O_RDONLY; } else { - pa_log(__FILE__": mmap(): %s", pa_cstrerror(errno)); + pa_log("mmap(): %s", pa_cstrerror(errno)); goto fail; } } else { @@ -565,12 +565,12 @@ int pa__init(pa_core *c, pa_module*m) { zero = 0; if (ioctl(u->fd, SNDCTL_DSP_SETTRIGGER, &zero) < 0) { - pa_log(__FILE__": SNDCTL_DSP_SETTRIGGER: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_SETTRIGGER: %s", pa_cstrerror(errno)); goto fail; } if (ioctl(u->fd, SNDCTL_DSP_SETTRIGGER, &enable_bits) < 0) { - pa_log(__FILE__": SNDCTL_DSP_SETTRIGGER: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_SETTRIGGER: %s", pa_cstrerror(errno)); goto fail; } diff --git a/src/modules/module-oss.c b/src/modules/module-oss.c index b9b80e72..b71581d9 100644 --- a/src/modules/module-oss.c +++ b/src/modules/module-oss.c @@ -166,7 +166,7 @@ static void do_write(struct userdata *u) { assert(memchunk->length); if ((r = pa_iochannel_write(u->io, (uint8_t*) memchunk->memblock->data + memchunk->index, memchunk->length)) < 0) { - pa_log(__FILE__": write() failed: %s", pa_cstrerror(errno)); + pa_log("write() failed: %s", pa_cstrerror(errno)); clear_up(u); pa_module_unload_request(u->module); @@ -222,7 +222,7 @@ static void do_read(struct userdata *u) { if ((r = pa_iochannel_read(u->io, memchunk.memblock->data, memchunk.memblock->length)) < 0) { pa_memblock_unref(memchunk.memblock); if (errno != EAGAIN) { - pa_log(__FILE__": read() failed: %s", pa_cstrerror(errno)); + pa_log("read() failed: %s", pa_cstrerror(errno)); clear_up(u); pa_module_unload_request(u->module); } @@ -260,7 +260,7 @@ static pa_usec_t sink_get_latency_cb(pa_sink *s) { assert(s && u && u->sink); if (ioctl(u->fd, SNDCTL_DSP_GETODELAY, &arg) < 0) { - pa_log_info(__FILE__": device doesn't support SNDCTL_DSP_GETODELAY: %s", pa_cstrerror(errno)); + pa_log_info("device doesn't support SNDCTL_DSP_GETODELAY: %s", pa_cstrerror(errno)); s->get_latency = NULL; return 0; } @@ -296,7 +296,7 @@ static int sink_get_hw_volume(pa_sink *s) { struct userdata *u = s->userdata; if (pa_oss_get_pcm_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) { - pa_log_info(__FILE__": device doesn't support reading mixer settings: %s", pa_cstrerror(errno)); + pa_log_info("device doesn't support reading mixer settings: %s", pa_cstrerror(errno)); s->get_hw_volume = NULL; return -1; } @@ -308,7 +308,7 @@ static int sink_set_hw_volume(pa_sink *s) { struct userdata *u = s->userdata; if (pa_oss_set_pcm_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) { - pa_log_info(__FILE__": device doesn't support writing mixer settings: %s", pa_cstrerror(errno)); + pa_log_info("device doesn't support writing mixer settings: %s", pa_cstrerror(errno)); s->set_hw_volume = NULL; return -1; } @@ -320,7 +320,7 @@ static int source_get_hw_volume(pa_source *s) { struct userdata *u = s->userdata; if (pa_oss_get_input_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) { - pa_log_info(__FILE__": device doesn't support reading mixer settings: %s", pa_cstrerror(errno)); + pa_log_info("device doesn't support reading mixer settings: %s", pa_cstrerror(errno)); s->get_hw_volume = NULL; return -1; } @@ -332,7 +332,7 @@ static int source_set_hw_volume(pa_source *s) { struct userdata *u = s->userdata; if (pa_oss_set_input_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) { - pa_log_info(__FILE__": device doesn't support writing mixer settings: %s", pa_cstrerror(errno)); + pa_log_info("device doesn't support writing mixer settings: %s", pa_cstrerror(errno)); s->set_hw_volume = NULL; return -1; } @@ -360,17 +360,17 @@ int pa__init(pa_core *c, pa_module*m) { assert(m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments."); + pa_log("failed to parse module arguments."); goto fail; } if (pa_modargs_get_value_boolean(ma, "record", &record) < 0 || pa_modargs_get_value_boolean(ma, "playback", &playback) < 0) { - pa_log(__FILE__": record= and playback= expect numeric argument."); + pa_log("record= and playback= expect numeric argument."); goto fail; } if (!playback && !record) { - pa_log(__FILE__": neither playback nor record enabled for device."); + pa_log("neither playback nor record enabled for device."); goto fail; } @@ -378,7 +378,7 @@ int pa__init(pa_core *c, pa_module*m) { ss = c->default_sample_spec; if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_OSS) < 0) { - pa_log(__FILE__": failed to parse sample specification or channel map"); + pa_log("failed to parse sample specification or channel map"); goto fail; } @@ -387,7 +387,7 @@ int pa__init(pa_core *c, pa_module*m) { frag_size = pa_bytes_per_second(&ss)/128; if (pa_modargs_get_value_s32(ma, "fragments", &nfrags) < 0 || pa_modargs_get_value_s32(ma, "fragment_size", &frag_size) < 0) { - pa_log(__FILE__": failed to parse fragments arguments"); + pa_log("failed to parse fragments arguments"); goto fail; } @@ -395,11 +395,11 @@ int pa__init(pa_core *c, pa_module*m) { goto fail; if (pa_oss_get_hw_description(p, hwdesc, sizeof(hwdesc)) >= 0) - pa_log_info(__FILE__": hardware name is '%s'.", hwdesc); + pa_log_info("hardware name is '%s'.", hwdesc); else hwdesc[0] = 0; - pa_log_info(__FILE__": device opened in %s mode.", mode == O_WRONLY ? "O_WRONLY" : (mode == O_RDONLY ? "O_RDONLY" : "O_RDWR")); + pa_log_info("device opened in %s mode.", mode == O_WRONLY ? "O_WRONLY" : (mode == O_RDONLY ? "O_RDONLY" : "O_RDWR")); if (nfrags >= 2 && frag_size >= 1) if (pa_oss_set_fragments(fd, nfrags, frag_size) < 0) @@ -409,7 +409,7 @@ int pa__init(pa_core *c, pa_module*m) { goto fail; if (ioctl(fd, SNDCTL_DSP_GETBLKSIZE, &frag_size) < 0) { - pa_log(__FILE__": SNDCTL_DSP_GETBLKSIZE: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_GETBLKSIZE: %s", pa_cstrerror(errno)); goto fail; } assert(frag_size); @@ -420,13 +420,13 @@ int pa__init(pa_core *c, pa_module*m) { u->use_getospace = u->use_getispace = 0; if (ioctl(fd, SNDCTL_DSP_GETISPACE, &info) >= 0) { - pa_log_info(__FILE__": input -- %u fragments of size %u.", info.fragstotal, info.fragsize); + pa_log_info("input -- %u fragments of size %u.", info.fragstotal, info.fragsize); in_frag_size = info.fragsize; u->use_getispace = 1; } if (ioctl(fd, SNDCTL_DSP_GETOSPACE, &info) >= 0) { - pa_log_info(__FILE__": output -- %u fragments of size %u.", info.fragstotal, info.fragsize); + pa_log_info("output -- %u fragments of size %u.", info.fragstotal, info.fragsize); out_frag_size = info.fragsize; u->use_getospace = 1; } diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c index c90039fd..4aee849b 100644 --- a/src/modules/module-pipe-sink.c +++ b/src/modules/module-pipe-sink.c @@ -100,7 +100,7 @@ static void do_write(struct userdata *u) { assert(u->memchunk.memblock && u->memchunk.length); if ((r = pa_iochannel_write(u->io, (uint8_t*) u->memchunk.memblock->data + u->memchunk.index, u->memchunk.length)) < 0) { - pa_log(__FILE__": write(): %s", pa_cstrerror(errno)); + pa_log("write(): %s", pa_cstrerror(errno)); return; } @@ -153,32 +153,32 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments"); + pa_log("failed to parse module arguments"); goto fail; } ss = c->default_sample_spec; if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_DEFAULT) < 0) { - pa_log(__FILE__": invalid sample format specification"); + pa_log("invalid sample format specification"); goto fail; } mkfifo(p = pa_modargs_get_value(ma, "file", DEFAULT_FIFO_NAME), 0777); if ((fd = open(p, O_RDWR)) < 0) { - pa_log(__FILE__": open('%s'): %s", p, pa_cstrerror(errno)); + pa_log("open('%s'): %s", p, pa_cstrerror(errno)); goto fail; } pa_fd_set_cloexec(fd, 1); if (fstat(fd, &st) < 0) { - pa_log(__FILE__": fstat('%s'): %s", p, pa_cstrerror(errno)); + pa_log("fstat('%s'): %s", p, pa_cstrerror(errno)); goto fail; } if (!S_ISFIFO(st.st_mode)) { - pa_log(__FILE__": '%s' is not a FIFO.", p); + pa_log("'%s' is not a FIFO.", p); goto fail; } @@ -189,7 +189,7 @@ int pa__init(pa_core *c, pa_module*m) { m->userdata = u; if (!(u->sink = pa_sink_new(c, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map))) { - pa_log(__FILE__": failed to create sink."); + pa_log("failed to create sink."); goto fail; } u->sink->notify = notify_cb; diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c index 43a8dab5..c251f7ac 100644 --- a/src/modules/module-pipe-source.c +++ b/src/modules/module-pipe-source.c @@ -97,7 +97,7 @@ static void do_read(struct userdata *u) { assert(u->chunk.memblock && u->chunk.memblock->length > u->chunk.index); if ((r = pa_iochannel_read(u->io, (uint8_t*) u->chunk.memblock->data + u->chunk.index, u->chunk.memblock->length - u->chunk.index)) <= 0) { - pa_log(__FILE__": read(): %s", pa_cstrerror(errno)); + pa_log("read(): %s", pa_cstrerror(errno)); return; } @@ -131,32 +131,32 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments"); + pa_log("failed to parse module arguments"); goto fail; } ss = c->default_sample_spec; if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_DEFAULT) < 0) { - pa_log(__FILE__": invalid sample format specification or channel map"); + pa_log("invalid sample format specification or channel map"); goto fail; } mkfifo(p = pa_modargs_get_value(ma, "file", DEFAULT_FIFO_NAME), 0777); if ((fd = open(p, O_RDWR)) < 0) { - pa_log(__FILE__": open('%s'): %s", p, pa_cstrerror(errno)); + pa_log("open('%s'): %s", p, pa_cstrerror(errno)); goto fail; } pa_fd_set_cloexec(fd, 1); if (fstat(fd, &st) < 0) { - pa_log(__FILE__": fstat('%s'): %s", p, pa_cstrerror(errno)); + pa_log("fstat('%s'): %s", p, pa_cstrerror(errno)); goto fail; } if (!S_ISFIFO(st.st_mode)) { - pa_log(__FILE__": '%s' is not a FIFO.", p); + pa_log("'%s' is not a FIFO.", p); goto fail; } @@ -166,7 +166,7 @@ int pa__init(pa_core *c, pa_module*m) { u->core = c; if (!(u->source = pa_source_new(c, __FILE__, pa_modargs_get_value(ma, "source_name", DEFAULT_SOURCE_NAME), 0, &ss, &map))) { - pa_log(__FILE__": failed to create source."); + pa_log("failed to create source."); goto fail; } u->source->userdata = u; diff --git a/src/modules/module-protocol-stub.c b/src/modules/module-protocol-stub.c index d1f5fa15..df58958a 100644 --- a/src/modules/module-protocol-stub.c +++ b/src/modules/module-protocol-stub.c @@ -221,7 +221,7 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": Failed to parse module arguments"); + pa_log("Failed to parse module arguments"); goto finish; } @@ -229,7 +229,7 @@ int pa__init(pa_core *c, pa_module*m) { #if defined(USE_TCP_SOCKETS) if (pa_modargs_get_value_u32(ma, "port", &port) < 0 || port < 1 || port > 0xFFFF) { - pa_log(__FILE__": port= expects a numerical argument between 1 and 65535."); + pa_log("port= expects a numerical argument between 1 and 65535."); goto fail; } @@ -268,18 +268,18 @@ int pa__init(pa_core *c, pa_module*m) { * /tmp/.esd/, hence we have to create the dir first */ if (pa_make_secure_parent_dir(u->socket_path, c->is_system_instance ? 0755 : 0700, (uid_t)-1, (gid_t)-1) < 0) { - pa_log(__FILE__": Failed to create socket directory: %s\n", pa_cstrerror(errno)); + pa_log("Failed to create socket directory: %s\n", pa_cstrerror(errno)); goto fail; } #endif if ((r = pa_unix_socket_remove_stale(tmp)) < 0) { - pa_log(__FILE__": Failed to remove stale UNIX socket '%s': %s", tmp, pa_cstrerror(errno)); + pa_log("Failed to remove stale UNIX socket '%s': %s", tmp, pa_cstrerror(errno)); goto fail; } if (r) - pa_log(__FILE__": Removed stale UNIX socket '%s'.", tmp); + pa_log("Removed stale UNIX socket '%s'.", tmp); if (!(s = pa_socket_server_new_unix(c->mainloop, tmp))) goto fail; diff --git a/src/modules/module-rescue-streams.c b/src/modules/module-rescue-streams.c index 5700ef43..7aa205bd 100644 --- a/src/modules/module-rescue-streams.c +++ b/src/modules/module-rescue-streams.c @@ -54,12 +54,12 @@ static pa_hook_result_t sink_hook_callback(pa_core *c, pa_sink *sink, void* user assert(sink); if (!pa_idxset_size(sink->inputs)) { - pa_log_debug(__FILE__": No sink inputs to move away."); + pa_log_debug("No sink inputs to move away."); return PA_HOOK_OK; } if (!(target = pa_namereg_get(c, NULL, PA_NAMEREG_SINK, 0))) { - pa_log_info(__FILE__": No evacuation sink found."); + pa_log_info("No evacuation sink found."); return PA_HOOK_OK; } @@ -67,11 +67,11 @@ static pa_hook_result_t sink_hook_callback(pa_core *c, pa_sink *sink, void* user while ((i = pa_idxset_first(sink->inputs, NULL))) { if (pa_sink_input_move_to(i, target, 1) < 0) { - pa_log_warn(__FILE__": Failed to move sink input %u \"%s\" to %s.", i->index, i->name, target->name); + pa_log_warn("Failed to move sink input %u \"%s\" to %s.", i->index, i->name, target->name); return PA_HOOK_OK; } - pa_log_info(__FILE__": Sucessfully moved sink input %u \"%s\" to %s.", i->index, i->name, target->name); + pa_log_info("Sucessfully moved sink input %u \"%s\" to %s.", i->index, i->name, target->name); } @@ -86,12 +86,12 @@ static pa_hook_result_t source_hook_callback(pa_core *c, pa_source *source, void assert(source); if (!pa_idxset_size(source->outputs)) { - pa_log_debug(__FILE__": No source outputs to move away."); + pa_log_debug("No source outputs to move away."); return PA_HOOK_OK; } if (!(target = pa_namereg_get(c, NULL, PA_NAMEREG_SOURCE, 0))) { - pa_log_info(__FILE__": No evacuation source found."); + pa_log_info("No evacuation source found."); return PA_HOOK_OK; } @@ -99,11 +99,11 @@ static pa_hook_result_t source_hook_callback(pa_core *c, pa_source *source, void while ((o = pa_idxset_first(source->outputs, NULL))) { if (pa_source_output_move_to(o, target) < 0) { - pa_log_warn(__FILE__": Failed to move source output %u \"%s\" to %s.", o->index, o->name, target->name); + pa_log_warn("Failed to move source output %u \"%s\" to %s.", o->index, o->name, target->name); return PA_HOOK_OK; } - pa_log_info(__FILE__": Sucessfully moved source output %u \"%s\" to %s.", o->index, o->name, target->name); + pa_log_info("Sucessfully moved source output %u \"%s\" to %s.", o->index, o->name, target->name); } @@ -118,7 +118,7 @@ int pa__init(pa_core *c, pa_module*m) { assert(m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": Failed to parse module arguments"); + pa_log("Failed to parse module arguments"); return -1; } diff --git a/src/modules/module-sine.c b/src/modules/module-sine.c index 89c3c609..fa29ba16 100644 --- a/src/modules/module-sine.c +++ b/src/modules/module-sine.c @@ -112,7 +112,7 @@ int pa__init(pa_core *c, pa_module*m) { pa_sink_input_new_data data; if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": Failed to parse module arguments"); + pa_log("Failed to parse module arguments"); goto fail; } @@ -125,7 +125,7 @@ int pa__init(pa_core *c, pa_module*m) { sink_name = pa_modargs_get_value(ma, "sink", NULL); if (!(sink = pa_namereg_get(c, sink_name, PA_NAMEREG_SINK, 1))) { - pa_log(__FILE__": No such sink."); + pa_log("No such sink."); goto fail; } @@ -135,7 +135,7 @@ int pa__init(pa_core *c, pa_module*m) { frequency = 440; if (pa_modargs_get_value_u32(ma, "frequency", &frequency) < 0 || frequency < 1 || frequency > ss.rate/2) { - pa_log(__FILE__": Invalid frequency specification"); + pa_log("Invalid frequency specification"); goto fail; } diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c index 53c73af7..e13254e9 100644 --- a/src/modules/module-solaris.c +++ b/src/modules/module-solaris.c @@ -144,7 +144,7 @@ static void do_write(struct userdata *u) { len = 0; if (len == u->buffer_size) - pa_log_debug(__FILE__": Solaris buffer underflow!"); + pa_log_debug("Solaris buffer underflow!"); len -= len % u->frame_size; @@ -168,7 +168,7 @@ static void do_write(struct userdata *u) { } if ((r = pa_iochannel_write(u->io, (uint8_t*) memchunk->memblock->data + memchunk->index, len)) < 0) { - pa_log(__FILE__": write() failed: %s", pa_cstrerror(errno)); + pa_log("write() failed: %s", pa_cstrerror(errno)); return; } @@ -206,7 +206,7 @@ static void do_read(struct userdata *u) { if ((r = pa_iochannel_read(u->io, memchunk.memblock->data, memchunk.memblock->length)) < 0) { pa_memblock_unref(memchunk.memblock); if (errno != EAGAIN) - pa_log(__FILE__": read() failed: %s", pa_cstrerror(errno)); + pa_log("read() failed: %s", pa_cstrerror(errno)); return; } @@ -332,9 +332,9 @@ static int sink_set_hw_volume_cb(pa_sink *s) { if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) { if (errno == EINVAL) - pa_log(__FILE__": AUDIO_SETINFO: Unsupported volume."); + pa_log("AUDIO_SETINFO: Unsupported volume."); else - pa_log(__FILE__": AUDIO_SETINFO: %s", pa_cstrerror(errno)); + pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno)); return -1; } @@ -363,7 +363,7 @@ static int sink_set_hw_mute_cb(pa_sink *s) { info.output_muted = !!s->hw_muted; if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) { - pa_log(__FILE__": AUDIO_SETINFO: %s", pa_cstrerror(errno)); + pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno)); return -1; } @@ -395,9 +395,9 @@ static int source_set_hw_volume_cb(pa_source *s) { if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) { if (errno == EINVAL) - pa_log(__FILE__": AUDIO_SETINFO: Unsupported volume."); + pa_log("AUDIO_SETINFO: Unsupported volume."); else - pa_log(__FILE__": AUDIO_SETINFO: %s", pa_cstrerror(errno)); + pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno)); return -1; } @@ -461,9 +461,9 @@ static int pa_solaris_auto_format(int fd, int mode, pa_sample_spec *ss) { if (ioctl(fd, AUDIO_SETINFO, &info) < 0) { if (errno == EINVAL) - pa_log(__FILE__": AUDIO_SETINFO: Unsupported sample format."); + pa_log("AUDIO_SETINFO: Unsupported sample format."); else - pa_log(__FILE__": AUDIO_SETINFO: %s", pa_cstrerror(errno)); + pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno)); return -1; } @@ -479,9 +479,9 @@ static int pa_solaris_set_buffer(int fd, int buffer_size) { if (ioctl(fd, AUDIO_SETINFO, &info) < 0) { if (errno == EINVAL) - pa_log(__FILE__": AUDIO_SETINFO: Unsupported buffer size."); + pa_log("AUDIO_SETINFO: Unsupported buffer size."); else - pa_log(__FILE__": AUDIO_SETINFO: %s", pa_cstrerror(errno)); + pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno)); return -1; } @@ -503,17 +503,17 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments."); + pa_log("failed to parse module arguments."); goto fail; } if (pa_modargs_get_value_boolean(ma, "record", &record) < 0 || pa_modargs_get_value_boolean(ma, "playback", &playback) < 0) { - pa_log(__FILE__": record= and playback= expect numeric argument."); + pa_log("record= and playback= expect numeric argument."); goto fail; } if (!playback && !record) { - pa_log(__FILE__": neither playback nor record enabled for device."); + pa_log("neither playback nor record enabled for device."); goto fail; } @@ -521,20 +521,20 @@ int pa__init(pa_core *c, pa_module*m) { buffer_size = 16384; if (pa_modargs_get_value_s32(ma, "buffer_size", &buffer_size) < 0) { - pa_log(__FILE__": failed to parse buffer size argument"); + pa_log("failed to parse buffer size argument"); goto fail; } ss = c->default_sample_spec; if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_DEFAULT) < 0) { - pa_log(__FILE__": failed to parse sample specification"); + pa_log("failed to parse sample specification"); goto fail; } if ((fd = open(p = pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), mode | O_NONBLOCK)) < 0) goto fail; - pa_log_info(__FILE__": device opened in %s mode.", mode == O_WRONLY ? "O_WRONLY" : (mode == O_RDONLY ? "O_RDONLY" : "O_RDWR")); + pa_log_info("device opened in %s mode.", mode == O_WRONLY ? "O_WRONLY" : (mode == O_RDONLY ? "O_RDONLY" : "O_RDWR")); if (pa_solaris_auto_format(fd, mode, &ss) < 0) goto fail; diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c index 53bffd3b..de1a12c9 100644 --- a/src/modules/module-tunnel.c +++ b/src/modules/module-tunnel.c @@ -206,7 +206,7 @@ static void command_stream_killed(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t comma struct userdata *u = userdata; assert(pd && t && u && u->pdispatch == pd); - pa_log(__FILE__": stream killed"); + pa_log("stream killed"); die(u); } @@ -223,7 +223,7 @@ static void command_subscribe_event(pa_pdispatch *pd, PA_GCC_UNUSED uint32_t com if (pa_tagstruct_getu32(t, &e) < 0 || pa_tagstruct_getu32(t, &idx) < 0 || !pa_tagstruct_eof(t)) { - pa_log(__FILE__": invalid protocol reply"); + pa_log("invalid protocol reply"); die(u); return; } @@ -284,13 +284,13 @@ static void command_request(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED ui if (pa_tagstruct_getu32(t, &channel) < 0 || pa_tagstruct_getu32(t, &bytes) < 0 || !pa_tagstruct_eof(t)) { - pa_log(__FILE__": invalid protocol reply"); + pa_log("invalid protocol reply"); die(u); return; } if (channel != u->channel) { - pa_log(__FILE__": recieved data for invalid channel"); + pa_log("recieved data for invalid channel"); die(u); return; } @@ -311,9 +311,9 @@ static void stream_get_latency_callback(pa_pdispatch *pd, uint32_t command, PA_G if (command != PA_COMMAND_REPLY) { if (command == PA_COMMAND_ERROR) - pa_log(__FILE__": failed to get latency."); + pa_log("failed to get latency."); else - pa_log(__FILE__": protocol error."); + pa_log("protocol error."); die(u); return; } @@ -326,7 +326,7 @@ static void stream_get_latency_callback(pa_pdispatch *pd, uint32_t command, PA_G pa_tagstruct_gets64(t, &write_index) < 0 || pa_tagstruct_gets64(t, &read_index) < 0 || !pa_tagstruct_eof(t)) { - pa_log(__FILE__": invalid reply. (latency)"); + pa_log("invalid reply. (latency)"); die(u); return; } @@ -353,7 +353,7 @@ static void stream_get_latency_callback(pa_pdispatch *pd, uint32_t command, PA_G u->host_latency = 0; #endif -/* pa_log(__FILE__": estimated host latency: %0.0f usec", (double) u->host_latency); */ +/* pa_log("estimated host latency: %0.0f usec", (double) u->host_latency); */ } static void request_latency(struct userdata *u) { @@ -392,9 +392,9 @@ static void stream_get_info_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_ if (command != PA_COMMAND_REPLY) { if (command == PA_COMMAND_ERROR) - pa_log(__FILE__": failed to get info."); + pa_log("failed to get info."); else - pa_log(__FILE__": protocol error."); + pa_log("protocol error."); die(u); return; } @@ -413,7 +413,7 @@ static void stream_get_info_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_ pa_tagstruct_gets(t, &driver) < 0 || pa_tagstruct_getu32(t, &flags) < 0 || !pa_tagstruct_eof(t)) { - pa_log(__FILE__": invalid reply. (get_info)"); + pa_log("invalid reply. (get_info)"); die(u); return; } @@ -495,9 +495,9 @@ static void create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UN if (command != PA_COMMAND_REPLY) { if (command == PA_COMMAND_ERROR) - pa_log(__FILE__": failed to create stream."); + pa_log("failed to create stream."); else - pa_log(__FILE__": protocol error."); + pa_log("protocol error."); die(u); return; } @@ -508,7 +508,7 @@ static void create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UN pa_tagstruct_getu32(t, &u->requested_bytes) < 0 || #endif !pa_tagstruct_eof(t)) { - pa_log(__FILE__": invalid reply. (create stream)"); + pa_log("invalid reply. (create stream)"); die(u); return; } @@ -535,16 +535,16 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t pa_tagstruct_getu32(t, &u->version) < 0 || !pa_tagstruct_eof(t)) { if (command == PA_COMMAND_ERROR) - pa_log(__FILE__": failed to authenticate"); + pa_log("failed to authenticate"); else - pa_log(__FILE__": protocol error."); + pa_log("protocol error."); die(u); return; } /* Minimum supported protocol version */ if (u->version < 8) { - pa_log(__FILE__": incompatible protocol version"); + pa_log("incompatible protocol version"); die(u); return; } @@ -606,7 +606,7 @@ static void pstream_die_callback(pa_pstream *p, void *userdata) { struct userdata *u = userdata; assert(p && u); - pa_log(__FILE__": stream died."); + pa_log("stream died."); die(u); } @@ -616,7 +616,7 @@ static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_c assert(p && packet && u); if (pa_pdispatch_run(u->pdispatch, packet, creds, u) < 0) { - pa_log(__FILE__": invalid packet"); + pa_log("invalid packet"); die(u); } } @@ -627,7 +627,7 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, PA_GCC_UN assert(p && chunk && u); if (channel != u->channel) { - pa_log(__FILE__": recieved memory block on bad channel."); + pa_log("recieved memory block on bad channel."); die(u); return; } @@ -646,7 +646,7 @@ static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata u->client = NULL; if (!io) { - pa_log(__FILE__": connection failed."); + pa_log("connection failed."); pa_module_unload_request(u->module); return; } @@ -833,7 +833,7 @@ static int load_key(struct userdata *u, const char*fn) { u->auth_cookie_in_property = 0; if (!fn && pa_authkey_prop_get(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME, u->auth_cookie, sizeof(u->auth_cookie)) >= 0) { - pa_log_debug(__FILE__": using already loaded auth cookie."); + pa_log_debug("using already loaded auth cookie."); pa_authkey_prop_ref(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME); u->auth_cookie_in_property = 1; return 0; @@ -845,7 +845,7 @@ static int load_key(struct userdata *u, const char*fn) { if (pa_authkey_load_auto(fn, u->auth_cookie, sizeof(u->auth_cookie)) < 0) return -1; - pa_log_debug(__FILE__": loading cookie from disk."); + pa_log_debug("loading cookie from disk."); if (pa_authkey_prop_put(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME, u->auth_cookie, sizeof(u->auth_cookie)) >= 0) u->auth_cookie_in_property = 1; @@ -864,7 +864,7 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments"); + pa_log("failed to parse module arguments"); goto fail; } @@ -894,18 +894,18 @@ int pa__init(pa_core *c, pa_module*m) { goto fail; if (!(u->server_name = pa_xstrdup(pa_modargs_get_value(ma, "server", NULL)))) { - pa_log(__FILE__": no server specified."); + pa_log("no server specified."); goto fail; } ss = c->default_sample_spec; if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_DEFAULT) < 0) { - pa_log(__FILE__": invalid sample format specification"); + pa_log("invalid sample format specification"); goto fail; } if (!(u->client = pa_socket_client_new_string(c->mainloop, u->server_name, PA_NATIVE_DEFAULT_PORT))) { - pa_log(__FILE__": failed to connect to server '%s'", u->server_name); + pa_log("failed to connect to server '%s'", u->server_name); goto fail; } @@ -916,7 +916,7 @@ int pa__init(pa_core *c, pa_module*m) { #ifdef TUNNEL_SINK if (!(u->sink = pa_sink_new(c, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map))) { - pa_log(__FILE__": failed to create sink."); + pa_log("failed to create sink."); goto fail; } @@ -933,7 +933,7 @@ int pa__init(pa_core *c, pa_module*m) { pa_sink_set_owner(u->sink, m); #else if (!(u->source = pa_source_new(c, __FILE__, pa_modargs_get_value(ma, "source_name", DEFAULT_SOURCE_NAME), 0, &ss, &map))) { - pa_log(__FILE__": failed to create source."); + pa_log("failed to create source."); goto fail; } diff --git a/src/modules/module-volume-restore.c b/src/modules/module-volume-restore.c index bdead0f6..0e4f278c 100644 --- a/src/modules/module-volume-restore.c +++ b/src/modules/module-volume-restore.c @@ -123,10 +123,10 @@ static int load_rules(struct userdata *u) { if (!f) { if (errno == ENOENT) { - pa_log_info(__FILE__": starting with empty ruleset."); + pa_log_info("starting with empty ruleset."); ret = 0; } else - pa_log(__FILE__": failed to open file '%s': %s", u->table_file, pa_cstrerror(errno)); + pa_log("failed to open file '%s': %s", u->table_file, pa_cstrerror(errno)); goto finish; } @@ -155,14 +155,14 @@ static int load_rules(struct userdata *u) { assert(ln == buf_volume); if (!parse_volume(buf_volume, &v)) { - pa_log(__FILE__": parse failure in %s:%u, stopping parsing", u->table_file, n); + pa_log("parse failure in %s:%u, stopping parsing", u->table_file, n); goto finish; } ln = buf_name; if (pa_hashmap_get(u->hashmap, buf_name)) { - pa_log(__FILE__": double entry in %s:%u, ignoring", u->table_file, n); + pa_log("double entry in %s:%u, ignoring", u->table_file, n); goto finish; } @@ -174,7 +174,7 @@ static int load_rules(struct userdata *u) { } if (ln == buf_volume) { - pa_log(__FILE__": invalid number of lines in %s.", u->table_file); + pa_log("invalid number of lines in %s.", u->table_file); goto finish; } @@ -200,7 +200,7 @@ static int save_rules(struct userdata *u) { pa_open_config_file(NULL, DEFAULT_VOLUME_TABLE_FILE, NULL, &u->table_file, "w"); if (!f) { - pa_log(__FILE__": failed to open file '%s': %s", u->table_file, pa_cstrerror(errno)); + pa_log("failed to open file '%s': %s", u->table_file, pa_cstrerror(errno)); goto finish; } @@ -279,12 +279,12 @@ static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint3 pa_xfree(name); if (!pa_cvolume_equal(pa_sink_input_get_volume(si), &r->volume)) { - pa_log_info(__FILE__": Saving volume for <%s>", r->name); + pa_log_info("Saving volume for <%s>", r->name); r->volume = *pa_sink_input_get_volume(si); u->modified = 1; } } else { - pa_log_info(__FILE__": Creating new entry for <%s>", name); + pa_log_info("Creating new entry for <%s>", name); r = pa_xnew(struct rule, 1); r->name = name; @@ -307,7 +307,7 @@ static pa_hook_result_t hook_callback(pa_core *c, pa_sink_input_new_data *data, if ((r = pa_hashmap_get(u->hashmap, name))) { if (data->sample_spec_is_set && data->sample_spec.channels == r->volume.channels) { - pa_log_info(__FILE__": Restoring volume for <%s>", r->name); + pa_log_info("Restoring volume for <%s>", r->name); pa_sink_input_new_data_set_volume(data, &r->volume); } } @@ -323,7 +323,7 @@ int pa__init(pa_core *c, pa_module*m) { assert(m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": Failed to parse module arguments"); + pa_log("Failed to parse module arguments"); goto fail; } diff --git a/src/modules/module-waveout.c b/src/modules/module-waveout.c index 5f55c202..2cc665b4 100644 --- a/src/modules/module-waveout.c +++ b/src/modules/module-waveout.c @@ -125,7 +125,7 @@ static void do_write(struct userdata *u) LeaveCriticalSection(&u->crit); if (free_frags == u->fragments) - pa_log_debug(__FILE__": WaveOut underflow!"); + pa_log_debug("WaveOut underflow!"); while (free_frags) { hdr = &u->ohdrs[u->cur_ohdr]; @@ -209,7 +209,7 @@ static void do_read(struct userdata *u) LeaveCriticalSection(&u->crit); if (free_frags == u->fragments) - pa_log_debug(__FILE__": WaveIn overflow!"); + pa_log_debug("WaveIn overflow!"); while (free_frags) { hdr = &u->ihdrs[u->cur_ihdr]; @@ -395,7 +395,7 @@ static int ss_to_waveformat(pa_sample_spec *ss, LPWAVEFORMATEX wf) { wf->wFormatTag = WAVE_FORMAT_PCM; if (ss->channels > 2) { - pa_log_error(__FILE__": ERROR: More than two channels not supported."); + pa_log_error("ERROR: More than two channels not supported."); return -1; } @@ -408,7 +408,7 @@ static int ss_to_waveformat(pa_sample_spec *ss, LPWAVEFORMATEX wf) { case 44100: break; default: - pa_log_error(__FILE__": ERROR: Unsupported sample rate."); + pa_log_error("ERROR: Unsupported sample rate."); return -1; } @@ -419,7 +419,7 @@ static int ss_to_waveformat(pa_sample_spec *ss, LPWAVEFORMATEX wf) { else if (ss->format == PA_SAMPLE_S16NE) wf->wBitsPerSample = 16; else { - pa_log_error(__FILE__": ERROR: Unsupported sample format."); + pa_log_error("ERROR: Unsupported sample format."); return -1; } @@ -447,30 +447,30 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments."); + pa_log("failed to parse module arguments."); goto fail; } if (pa_modargs_get_value_boolean(ma, "record", &record) < 0 || pa_modargs_get_value_boolean(ma, "playback", &playback) < 0) { - pa_log(__FILE__": record= and playback= expect boolean argument."); + pa_log("record= and playback= expect boolean argument."); goto fail; } if (!playback && !record) { - pa_log(__FILE__": neither playback nor record enabled for device."); + pa_log("neither playback nor record enabled for device."); goto fail; } nfrags = 5; frag_size = 8192; if (pa_modargs_get_value_s32(ma, "fragments", &nfrags) < 0 || pa_modargs_get_value_s32(ma, "fragment_size", &frag_size) < 0) { - pa_log(__FILE__": failed to parse fragments arguments"); + pa_log("failed to parse fragments arguments"); goto fail; } ss = c->default_sample_spec; if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_WAVEEX) < 0) { - pa_log(__FILE__": failed to parse sample specification"); + pa_log("failed to parse sample specification"); goto fail; } @@ -484,13 +484,13 @@ int pa__init(pa_core *c, pa_module*m) { goto fail; if (waveInStart(hwi) != MMSYSERR_NOERROR) goto fail; - pa_log_debug(__FILE__": Opened waveIn subsystem."); + pa_log_debug("Opened waveIn subsystem."); } if (playback) { if (waveOutOpen(&hwo, WAVE_MAPPER, &wf, (DWORD_PTR)chunk_done_cb, (DWORD_PTR)u, CALLBACK_FUNCTION) != MMSYSERR_NOERROR) goto fail; - pa_log_debug(__FILE__": Opened waveOut subsystem."); + pa_log_debug("Opened waveOut subsystem."); } InitializeCriticalSection(&u->crit); diff --git a/src/modules/module-x11-bell.c b/src/modules/module-x11-bell.c index 7ac5f558..48e95c8c 100644 --- a/src/modules/module-x11-bell.c +++ b/src/modules/module-x11-bell.c @@ -70,7 +70,7 @@ static int ring_bell(struct userdata *u, int percent) { assert(u); if (!(s = pa_namereg_get(u->core, u->sink_name, PA_NAMEREG_SINK, 1))) { - pa_log(__FILE__": Invalid sink: %s", u->sink_name); + pa_log("Invalid sink: %s", u->sink_name); return -1; } @@ -89,7 +89,7 @@ static int x11_event_callback(pa_x11_wrapper *w, XEvent *e, void *userdata) { bne = (XkbBellNotifyEvent*) e; if (ring_bell(u, bne->percent) < 0) { - pa_log_info(__FILE__": Ringing bell failed, reverting to X11 device bell."); + pa_log_info("Ringing bell failed, reverting to X11 device bell."); XkbForceDeviceBell(pa_x11_wrapper_get_display(w), bne->device, bne->bell_class, bne->bell_id, bne->percent); } @@ -104,7 +104,7 @@ int pa__init(pa_core *c, pa_module*m) { assert(c && m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments"); + pa_log("failed to parse module arguments"); goto fail; } @@ -121,7 +121,7 @@ int pa__init(pa_core *c, pa_module*m) { minor = XkbMinorVersion; if (!XkbLibraryVersion(&major, &minor)) { - pa_log(__FILE__": XkbLibraryVersion() failed"); + pa_log("XkbLibraryVersion() failed"); goto fail; } @@ -130,7 +130,7 @@ int pa__init(pa_core *c, pa_module*m) { if (!XkbQueryExtension(pa_x11_wrapper_get_display(u->x11_wrapper), NULL, &u->xkb_event_base, NULL, &major, &minor)) { - pa_log(__FILE__": XkbQueryExtension() failed"); + pa_log("XkbQueryExtension() failed"); goto fail; } diff --git a/src/modules/module-x11-publish.c b/src/modules/module-x11-publish.c index 0ee453cc..f2cace14 100644 --- a/src/modules/module-x11-publish.c +++ b/src/modules/module-x11-publish.c @@ -79,7 +79,7 @@ static int load_key(struct userdata *u, const char*fn) { u->auth_cookie_in_property = 0; if (!fn && pa_authkey_prop_get(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME, u->auth_cookie, sizeof(u->auth_cookie)) >= 0) { - pa_log_debug(__FILE__": using already loaded auth cookie."); + pa_log_debug("using already loaded auth cookie."); pa_authkey_prop_ref(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME); u->auth_cookie_in_property = 1; return 0; @@ -91,7 +91,7 @@ static int load_key(struct userdata *u, const char*fn) { if (pa_authkey_load_auto(fn, u->auth_cookie, sizeof(u->auth_cookie)) < 0) return -1; - pa_log_debug(__FILE__": loading cookie from disk."); + pa_log_debug("loading cookie from disk."); if (pa_authkey_prop_put(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME, u->auth_cookie, sizeof(u->auth_cookie)) >= 0) u->auth_cookie_in_property = 1; @@ -109,7 +109,7 @@ int pa__init(pa_core *c, pa_module*m) { pa_strlist *l; if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments"); + pa_log("failed to parse module arguments"); goto fail; } @@ -168,7 +168,7 @@ void pa__done(pa_core *c, pa_module*m) { /* Yes, here is a race condition */ if (!pa_x11_get_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_ID", t, sizeof(t)) || strcmp(t, u->id)) - pa_log_warn(__FILE__": PulseAudio information vanished from X11!"); + pa_log_warn("PulseAudio information vanished from X11!"); else { pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_ID"); pa_x11_del_prop(pa_x11_wrapper_get_display(u->x11_wrapper), "PULSE_SERVER"); diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c index 651a95b7..696d8afe 100644 --- a/src/modules/module-zeroconf-publish.c +++ b/src/modules/module-zeroconf-publish.c @@ -203,12 +203,12 @@ static int publish_service(struct userdata *u, struct service *s) { u->port, txt) < 0) { - pa_log(__FILE__": avahi_entry_group_add_service_strlst(): %s", avahi_strerror(avahi_client_errno(u->client))); + pa_log("avahi_entry_group_add_service_strlst(): %s", avahi_strerror(avahi_client_errno(u->client))); goto finish; } if (avahi_entry_group_commit(s->entry_group) < 0) { - pa_log(__FILE__": avahi_entry_group_commit(): %s", avahi_strerror(avahi_client_errno(u->client))); + pa_log("avahi_entry_group_commit(): %s", avahi_strerror(avahi_client_errno(u->client))); goto finish; } @@ -456,7 +456,7 @@ static int publish_main_service(struct userdata *u) { if (!u->main_entry_group) { if (!(u->main_entry_group = avahi_entry_group_new(u->client, main_entry_group_callback, u))) { - pa_log(__FILE__": avahi_entry_group_new() failed: %s", avahi_strerror(avahi_client_errno(u->client))); + pa_log("avahi_entry_group_new() failed: %s", avahi_strerror(avahi_client_errno(u->client))); goto fail; } } else @@ -475,12 +475,12 @@ static int publish_main_service(struct userdata *u) { u->port, txt) < 0) { - pa_log(__FILE__": avahi_entry_group_add_service_strlst() failed: %s", avahi_strerror(avahi_client_errno(u->client))); + pa_log("avahi_entry_group_add_service_strlst() failed: %s", avahi_strerror(avahi_client_errno(u->client))); goto fail; } if (avahi_entry_group_commit(u->main_entry_group) < 0) { - pa_log(__FILE__": avahi_entry_group_commit() failed: %s", avahi_strerror(avahi_client_errno(u->client))); + pa_log("avahi_entry_group_commit() failed: %s", avahi_strerror(avahi_client_errno(u->client))); goto fail; } @@ -501,7 +501,7 @@ static int publish_all_services(struct userdata *u) { assert(u); - pa_log_debug(__FILE__": Publishing services in Zeroconf"); + pa_log_debug("Publishing services in Zeroconf"); for (sink = pa_idxset_first(u->core->sinks, &idx); sink; sink = pa_idxset_next(u->core->sinks, &idx)) if (publish_sink(u, sink) < 0) @@ -531,7 +531,7 @@ static void unpublish_all_services(struct userdata *u, int rem) { assert(u); - pa_log_debug(__FILE__": Unpublishing services in Zeroconf"); + pa_log_debug("Unpublishing services in Zeroconf"); while ((s = pa_hashmap_iterate(u->services, &state, NULL))) { if (s->entry_group) { @@ -576,7 +576,7 @@ static void client_callback(AvahiClient *c, AvahiClientState state, void *userda avahi_client_free(u->client); if (!(u->client = avahi_client_new(u->avahi_poll, AVAHI_CLIENT_NO_FAIL, client_callback, u, &error))) - pa_log(__FILE__": pa_avahi_client_new() failed: %s", avahi_strerror(error)); + pa_log("pa_avahi_client_new() failed: %s", avahi_strerror(error)); } break; @@ -593,12 +593,12 @@ int pa__init(pa_core *c, pa_module*m) { int error; if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments."); + pa_log("failed to parse module arguments."); goto fail; } if (pa_modargs_get_value_u32(ma, "port", &port) < 0 || port == 0 || port >= 0xFFFF) { - pa_log(__FILE__": invalid port specified."); + pa_log("invalid port specified."); goto fail; } @@ -623,7 +623,7 @@ int pa__init(pa_core *c, pa_module*m) { u->service_name = pa_xstrdup(pa_get_host_name(hn, sizeof(hn))); if (!(u->client = avahi_client_new(u->avahi_poll, AVAHI_CLIENT_NO_FAIL, client_callback, u, &error))) { - pa_log(__FILE__": pa_avahi_client_new() failed: %s", avahi_strerror(error)); + pa_log("pa_avahi_client_new() failed: %s", avahi_strerror(error)); goto fail; } diff --git a/src/modules/oss-util.c b/src/modules/oss-util.c index 177322be..d1c623b4 100644 --- a/src/modules/oss-util.c +++ b/src/modules/oss-util.c @@ -57,27 +57,27 @@ int pa_oss_open(const char *device, int *mode, int* pcaps) { tcaps = pcaps ? pcaps : &dcaps; if (ioctl(fd, SNDCTL_DSP_GETCAPS, tcaps) < 0) { - pa_log(__FILE__": SNDCTL_DSP_GETCAPS: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_GETCAPS: %s", pa_cstrerror(errno)); goto fail; } if (*tcaps & DSP_CAP_DUPLEX) goto success; - pa_log_warn(__FILE__": '%s' doesn't support full duplex", device); + pa_log_warn("'%s' doesn't support full duplex", device); close(fd); } if ((fd = open(device, (*mode = O_WRONLY)|O_NDELAY)) < 0) { if ((fd = open(device, (*mode = O_RDONLY)|O_NDELAY)) < 0) { - pa_log(__FILE__": open('%s'): %s", device, pa_cstrerror(errno)); + pa_log("open('%s'): %s", device, pa_cstrerror(errno)); goto fail; } } } else { if ((fd = open(device, *mode|O_NDELAY)) < 0) { - pa_log(__FILE__": open('%s'): %s", device, pa_cstrerror(errno)); + pa_log("open('%s'): %s", device, pa_cstrerror(errno)); goto fail; } } @@ -87,11 +87,11 @@ success: *pcaps = 0; if (ioctl(fd, SNDCTL_DSP_GETCAPS, pcaps) < 0) { - pa_log(__FILE__": SNDCTL_DSP_GETCAPS: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_GETCAPS: %s", pa_cstrerror(errno)); goto fail; } - pa_log_debug(__FILE__": capabilities:%s%s%s%s%s%s%s%s%s%s%s%s%s%s", + pa_log_debug("capabilities:%s%s%s%s%s%s%s%s%s%s%s%s%s%s", *pcaps & DSP_CAP_BATCH ? " BATCH" : "", *pcaps & DSP_CAP_BIND ? " BIND" : "", *pcaps & DSP_CAP_COPROC ? " COPROC" : "", @@ -168,7 +168,7 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) { if (ioctl(fd, SNDCTL_DSP_SETFMT, &format) < 0 || format != f) { format = AFMT_U8; if (ioctl(fd, SNDCTL_DSP_SETFMT, &format) < 0 || format != AFMT_U8) { - pa_log(__FILE__": SNDCTL_DSP_SETFMT: %s", format != AFMT_U8 ? "No supported sample format" : pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_SETFMT: %s", format != AFMT_U8 ? "No supported sample format" : pa_cstrerror(errno)); return -1; } else ss->format = PA_SAMPLE_U8; @@ -179,31 +179,31 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) { } if (orig_format != ss->format) - pa_log_warn(__FILE__": device doesn't support sample format %s, changed to %s.", + pa_log_warn("device doesn't support sample format %s, changed to %s.", pa_sample_format_to_string(orig_format), pa_sample_format_to_string(ss->format)); channels = ss->channels; if (ioctl(fd, SNDCTL_DSP_CHANNELS, &channels) < 0) { - pa_log(__FILE__": SNDCTL_DSP_CHANNELS: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_CHANNELS: %s", pa_cstrerror(errno)); return -1; } assert(channels > 0); if (ss->channels != channels) { - pa_log_warn(__FILE__": device doesn't support %i channels, using %i channels.", ss->channels, channels); + pa_log_warn("device doesn't support %i channels, using %i channels.", ss->channels, channels); ss->channels = channels; } speed = ss->rate; if (ioctl(fd, SNDCTL_DSP_SPEED, &speed) < 0) { - pa_log(__FILE__": SNDCTL_DSP_SPEED: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_SPEED: %s", pa_cstrerror(errno)); return -1; } assert(speed > 0); if (ss->rate != (unsigned) speed) { - pa_log_warn(__FILE__": device doesn't support %i Hz, changed to %i Hz.", ss->rate, speed); + pa_log_warn("device doesn't support %i Hz, changed to %i Hz.", ss->rate, speed); /* If the sample rate deviates too much, we need to resample */ if (speed < ss->rate*.95 || speed > ss->rate*1.05) @@ -230,7 +230,7 @@ int pa_oss_set_fragments(int fd, int nfrags, int frag_size) { arg = ((int) nfrags << 16) | simple_log2(frag_size); if (ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &arg) < 0) { - pa_log(__FILE__": SNDCTL_DSP_SETFRAGMENT: %s", pa_cstrerror(errno)); + pa_log("SNDCTL_DSP_SETFRAGMENT: %s", pa_cstrerror(errno)); return -1; } @@ -253,7 +253,7 @@ static int pa_oss_get_volume(int fd, int mixer, const pa_sample_spec *ss, pa_cvo if ((volume->channels = ss->channels) >= 2) volume->values[1] = (((vol >> 8) & 0xFF) * PA_VOLUME_NORM) / 100; - pa_log_debug(__FILE__": Read mixer settings: %s", pa_cvolume_snprint(cv, sizeof(cv), volume)); + pa_log_debug("Read mixer settings: %s", pa_cvolume_snprint(cv, sizeof(cv), volume)); return 0; } @@ -274,7 +274,7 @@ static int pa_oss_set_volume(int fd, int mixer, const pa_sample_spec *ss, const if (ioctl(fd, mixer, &vol) < 0) return -1; - pa_log_debug(__FILE__": Wrote mixer settings: %s", pa_cvolume_snprint(cv, sizeof(cv), volume)); + pa_log_debug("Wrote mixer settings: %s", pa_cvolume_snprint(cv, sizeof(cv), volume)); return 0; } @@ -319,7 +319,7 @@ int pa_oss_get_hw_description(const char *dev, char *name, size_t l) { !(f = fopen("/proc/asound/oss/sndstat", "r"))) { if (errno != ENOENT) - pa_log_warn(__FILE__": failed to open OSS sndstat device: %s", pa_cstrerror(errno)); + pa_log_warn("failed to open OSS sndstat device: %s", pa_cstrerror(errno)); return -1; } diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c index 5d3f3e27..338d57cf 100644 --- a/src/modules/rtp/module-rtp-recv.c +++ b/src/modules/rtp/module-rtp-recv.c @@ -165,7 +165,7 @@ static void rtp_event_cb(pa_mainloop_api *m, pa_io_event *e, int fd, pa_io_event s->offset = s->rtp_context.timestamp; if (s->ssrc == s->userdata->core->cookie) - pa_log_warn(__FILE__": WARNING! Detected RTP packet loop!"); + pa_log_warn("WARNING! Detected RTP packet loop!"); } else { if (s->ssrc != s->rtp_context.ssrc) { pa_memblock_unref(chunk.memblock); @@ -217,13 +217,13 @@ static int mcast_socket(const struct sockaddr* sa, socklen_t salen) { af = sa->sa_family; if ((fd = socket(af, SOCK_DGRAM, 0)) < 0) { - pa_log(__FILE__": Failed to create socket: %s", pa_cstrerror(errno)); + pa_log("Failed to create socket: %s", pa_cstrerror(errno)); goto fail; } one = 1; if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) { - pa_log(__FILE__": SO_REUSEADDR failed: %s", pa_cstrerror(errno)); + pa_log("SO_REUSEADDR failed: %s", pa_cstrerror(errno)); goto fail; } @@ -240,12 +240,12 @@ static int mcast_socket(const struct sockaddr* sa, socklen_t salen) { } if (r < 0) { - pa_log_info(__FILE__": Joining mcast group failed: %s", pa_cstrerror(errno)); + pa_log_info("Joining mcast group failed: %s", pa_cstrerror(errno)); goto fail; } if (bind(fd, sa, salen) < 0) { - pa_log(__FILE__": bind() failed: %s", pa_cstrerror(errno)); + pa_log("bind() failed: %s", pa_cstrerror(errno)); goto fail; } @@ -268,12 +268,12 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in pa_sink_input_new_data data; if (u->n_sessions >= MAX_SESSIONS) { - pa_log(__FILE__": session limit reached."); + pa_log("session limit reached."); goto fail; } if (!(sink = pa_namereg_get(u->core, u->sink_name, PA_NAMEREG_SINK, 1))) { - pa_log(__FILE__": sink does not exist."); + pa_log("sink does not exist."); goto fail; } @@ -301,7 +301,7 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in pa_xfree(c); if (!s->sink_input) { - pa_log(__FILE__": failed to create sink input."); + pa_log("failed to create sink input."); goto fail; } @@ -338,7 +338,7 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in pa_rtp_context_init_recv(&s->rtp_context, fd, pa_frame_size(&s->sdp_info.sample_spec)); - pa_log_info(__FILE__": Found new session '%s'", s->sdp_info.session_name); + pa_log_info("Found new session '%s'", s->sdp_info.session_name); u->n_sessions++; @@ -358,7 +358,7 @@ fail: static void session_free(struct session *s, int from_hash) { assert(s); - pa_log_info(__FILE__": Freeing session '%s'", s->sdp_info.session_name); + pa_log_info("Freeing session '%s'", s->sdp_info.session_name); s->userdata->core->mainloop->time_free(s->death_event); s->userdata->core->mainloop->io_free(s->rtp_event); @@ -435,7 +435,7 @@ int pa__init(pa_core *c, pa_module*m) { assert(m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments"); + pa_log("failed to parse module arguments"); goto fail; } @@ -452,7 +452,7 @@ int pa__init(pa_core *c, pa_module*m) { sa = (struct sockaddr*) &sa4; salen = sizeof(sa4); } else { - pa_log(__FILE__": invalid SAP address '%s'", sap_address); + pa_log("invalid SAP address '%s'", sap_address); goto fail; } diff --git a/src/modules/rtp/module-rtp-send.c b/src/modules/rtp/module-rtp-send.c index 1b85c840..61dd0047 100644 --- a/src/modules/rtp/module-rtp-send.c +++ b/src/modules/rtp/module-rtp-send.c @@ -105,7 +105,7 @@ static void source_output_push(pa_source_output *o, const pa_memchunk *chunk) { u = o->userdata; if (pa_memblockq_push(u->memblockq, chunk) < 0) { - pa_log(__FILE__": Failed to push chunk into memblockq."); + pa_log("Failed to push chunk into memblockq."); return; } @@ -174,17 +174,17 @@ int pa__init(pa_core *c, pa_module*m) { assert(m); if (!(ma = pa_modargs_new(m->argument, valid_modargs))) { - pa_log(__FILE__": failed to parse module arguments"); + pa_log("failed to parse module arguments"); goto fail; } if (!(s = pa_namereg_get(m->core, pa_modargs_get_value(ma, "source", NULL), PA_NAMEREG_SOURCE, 1))) { - pa_log(__FILE__": source does not exist."); + pa_log("source does not exist."); goto fail; } if (pa_modargs_get_value_boolean(ma, "loop", &loop) < 0) { - pa_log(__FILE__": failed to parse \"loop\" parameter."); + pa_log("failed to parse \"loop\" parameter."); goto fail; } @@ -192,12 +192,12 @@ int pa__init(pa_core *c, pa_module*m) { pa_rtp_sample_spec_fixup(&ss); cm = s->channel_map; if (pa_modargs_get_sample_spec(ma, &ss) < 0) { - pa_log(__FILE__": failed to parse sample specification"); + pa_log("failed to parse sample specification"); goto fail; } if (!pa_rtp_sample_spec_valid(&ss)) { - pa_log(__FILE__": specified sample type not compatible with RTP"); + pa_log("specified sample type not compatible with RTP"); goto fail; } @@ -209,18 +209,18 @@ int pa__init(pa_core *c, pa_module*m) { mtu = (DEFAULT_MTU/pa_frame_size(&ss))*pa_frame_size(&ss); if (pa_modargs_get_value_u32(ma, "mtu", &mtu) < 0 || mtu < 1 || mtu % pa_frame_size(&ss) != 0) { - pa_log(__FILE__": invalid mtu."); + pa_log("invalid mtu."); goto fail; } port = DEFAULT_PORT + ((rand() % 512) << 1); if (pa_modargs_get_value_u32(ma, "port", &port) < 0 || port < 1 || port > 0xFFFF) { - pa_log(__FILE__": port= expects a numerical argument between 1 and 65535."); + pa_log("port= expects a numerical argument between 1 and 65535."); goto fail; } if (port & 1) - pa_log_warn(__FILE__": WARNING: port number not even as suggested in RFC3550!"); + pa_log_warn("WARNING: port number not even as suggested in RFC3550!"); dest = pa_modargs_get_value(ma, "destination", DEFAULT_DESTINATION); @@ -235,33 +235,33 @@ int pa__init(pa_core *c, pa_module*m) { sap_sa4 = sa4; sap_sa4.sin_port = htons(SAP_PORT); } else { - pa_log(__FILE__": invalid destination '%s'", dest); + pa_log("invalid destination '%s'", dest); goto fail; } if ((fd = socket(af, SOCK_DGRAM, 0)) < 0) { - pa_log(__FILE__": socket() failed: %s", pa_cstrerror(errno)); + pa_log("socket() failed: %s", pa_cstrerror(errno)); goto fail; } if (connect(fd, af == AF_INET ? (struct sockaddr*) &sa4 : (struct sockaddr*) &sa6, af == AF_INET ? sizeof(sa4) : sizeof(sa6)) < 0) { - pa_log(__FILE__": connect() failed: %s", pa_cstrerror(errno)); + pa_log("connect() failed: %s", pa_cstrerror(errno)); goto fail; } if ((sap_fd = socket(af, SOCK_DGRAM, 0)) < 0) { - pa_log(__FILE__": socket() failed: %s", pa_cstrerror(errno)); + pa_log("socket() failed: %s", pa_cstrerror(errno)); goto fail; } if (connect(sap_fd, af == AF_INET ? (struct sockaddr*) &sap_sa4 : (struct sockaddr*) &sap_sa6, af == AF_INET ? sizeof(sap_sa4) : sizeof(sap_sa6)) < 0) { - pa_log(__FILE__": connect() failed: %s", pa_cstrerror(errno)); + pa_log("connect() failed: %s", pa_cstrerror(errno)); goto fail; } if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)) < 0 || setsockopt(sap_fd, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)) < 0) { - pa_log(__FILE__": IP_MULTICAST_LOOP failed: %s", pa_cstrerror(errno)); + pa_log("IP_MULTICAST_LOOP failed: %s", pa_cstrerror(errno)); goto fail; } @@ -274,7 +274,7 @@ int pa__init(pa_core *c, pa_module*m) { pa_source_output_new_data_set_channel_map(&data, &cm); if (!(o = pa_source_output_new(c, &data, 0))) { - pa_log(__FILE__": failed to create source output."); + pa_log("failed to create source output."); goto fail; } @@ -317,8 +317,8 @@ int pa__init(pa_core *c, pa_module*m) { pa_rtp_context_init_send(&u->rtp_context, fd, c->cookie, payload, pa_frame_size(&ss)); pa_sap_context_init_send(&u->sap_context, sap_fd, p); - pa_log_info(__FILE__": RTP stream initialized with mtu %u on %s:%u, SSRC=0x%08x, payload=%u, initial sequence #%u", mtu, dest, port, u->rtp_context.ssrc, payload, u->rtp_context.sequence); - pa_log_info(__FILE__": SDP-Data:\n%s\n"__FILE__": EOF", p); + pa_log_info("RTP stream initialized with mtu %u on %s:%u, SSRC=0x%08x, payload=%u, initial sequence #%u", mtu, dest, port, u->rtp_context.ssrc, payload, u->rtp_context.sequence); + pa_log_info("SDP-Data:\n%s\n"__FILE__": EOF", p); pa_sap_send(&u->sap_context, 0); diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c index 8e77c60a..3bb0ea47 100644 --- a/src/modules/rtp/rtp.c +++ b/src/modules/rtp/rtp.c @@ -125,7 +125,7 @@ int pa_rtp_send(pa_rtp_context *c, size_t size, pa_memblockq *q) { if (k < 0) { if (errno != EAGAIN) /* If the queue is full, just ignore it */ - pa_log(__FILE__": sendmsg() failed: %s", pa_cstrerror(errno)); + pa_log("sendmsg() failed: %s", pa_cstrerror(errno)); return -1; } @@ -163,7 +163,7 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool) { chunk->memblock = NULL; if (ioctl(c->fd, FIONREAD, &size) < 0) { - pa_log(__FILE__": FIONREAD failed: %s", pa_cstrerror(errno)); + pa_log("FIONREAD failed: %s", pa_cstrerror(errno)); goto fail; } @@ -184,12 +184,12 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool) { m.msg_flags = 0; if ((r = recvmsg(c->fd, &m, 0)) != size) { - pa_log(__FILE__": recvmsg() failed: %s", r < 0 ? pa_cstrerror(errno) : "size mismatch"); + pa_log("recvmsg() failed: %s", r < 0 ? pa_cstrerror(errno) : "size mismatch"); goto fail; } if (size < 12) { - pa_log(__FILE__": RTP packet too short."); + pa_log("RTP packet too short."); goto fail; } @@ -202,17 +202,17 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool) { c->ssrc = ntohl(c->ssrc); if ((header >> 30) != 2) { - pa_log(__FILE__": Unsupported RTP version."); + pa_log("Unsupported RTP version."); goto fail; } if ((header >> 29) & 1) { - pa_log(__FILE__": RTP padding not supported."); + pa_log("RTP padding not supported."); goto fail; } if ((header >> 28) & 1) { - pa_log(__FILE__": RTP header extensions not supported."); + pa_log("RTP header extensions not supported."); goto fail; } @@ -221,7 +221,7 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool) { c->sequence = header & 0xFFFF; if (12 + cc*4 > size) { - pa_log(__FILE__": RTP packet too short. (CSRC)"); + pa_log("RTP packet too short. (CSRC)"); goto fail; } @@ -229,7 +229,7 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool) { chunk->length = size - chunk->index; if (chunk->length % c->frame_size != 0) { - pa_log(__FILE__": Vad RTP packet size."); + pa_log("Vad RTP packet size."); goto fail; } diff --git a/src/modules/rtp/sap.c b/src/modules/rtp/sap.c index 615b8e4e..022c7fa3 100644 --- a/src/modules/rtp/sap.c +++ b/src/modules/rtp/sap.c @@ -138,7 +138,7 @@ int pa_sap_recv(pa_sap_context *c, int *goodbye) { assert(goodbye); if (ioctl(c->fd, FIONREAD, &size) < 0) { - pa_log(__FILE__": FIONREAD failed: %s", pa_cstrerror(errno)); + pa_log("FIONREAD failed: %s", pa_cstrerror(errno)); goto fail; } @@ -160,12 +160,12 @@ int pa_sap_recv(pa_sap_context *c, int *goodbye) { m.msg_flags = 0; if ((r = recvmsg(c->fd, &m, 0)) != size) { - pa_log(__FILE__": recvmsg() failed: %s", r < 0 ? pa_cstrerror(errno) : "size mismatch"); + pa_log("recvmsg() failed: %s", r < 0 ? pa_cstrerror(errno) : "size mismatch"); goto fail; } if (size < 4) { - pa_log(__FILE__": SAP packet too short."); + pa_log("SAP packet too short."); goto fail; } @@ -173,17 +173,17 @@ int pa_sap_recv(pa_sap_context *c, int *goodbye) { header = ntohl(header); if (header >> 29 != 1) { - pa_log(__FILE__": Unsupported SAP version."); + pa_log("Unsupported SAP version."); goto fail; } if ((header >> 25) & 1) { - pa_log(__FILE__": Encrypted SAP not supported."); + pa_log("Encrypted SAP not supported."); goto fail; } if ((header >> 24) & 1) { - pa_log(__FILE__": Compressed SAP not supported."); + pa_log("Compressed SAP not supported."); goto fail; } @@ -192,7 +192,7 @@ int pa_sap_recv(pa_sap_context *c, int *goodbye) { k = 4 + (six ? 16 : 4) + ac*4; if (size < k) { - pa_log(__FILE__": SAP packet too short (AD)."); + pa_log("SAP packet too short (AD)."); goto fail; } @@ -203,7 +203,7 @@ int pa_sap_recv(pa_sap_context *c, int *goodbye) { e += sizeof(MIME_TYPE); size -= sizeof(MIME_TYPE); } else if ((unsigned) size < sizeof(PA_SDP_HEADER)-1 || strncmp(e, PA_SDP_HEADER, sizeof(PA_SDP_HEADER)-1)) { - pa_log(__FILE__": Invalid SDP header."); + pa_log("Invalid SDP header."); goto fail; } diff --git a/src/modules/rtp/sdp.c b/src/modules/rtp/sdp.c index e707e4bb..1b71a9a0 100644 --- a/src/modules/rtp/sdp.c +++ b/src/modules/rtp/sdp.c @@ -129,7 +129,7 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) { i->payload = 255; if (!pa_startswith(t, PA_SDP_HEADER)) { - pa_log(__FILE__": Failed to parse SDP data: invalid header."); + pa_log("Failed to parse SDP data: invalid header."); goto fail; } @@ -141,7 +141,7 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) { l = strcspn(t, "\n"); if (l <= 2) { - pa_log(__FILE__": Failed to parse SDP data: line too short: >%s<.", t); + pa_log("Failed to parse SDP data: line too short: >%s<.", t); goto fail; } @@ -159,7 +159,7 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) { a[strcspn(a, "/")] = 0; if (inet_pton(AF_INET, a, &((struct sockaddr_in*) &i->sa)->sin_addr) <= 0) { - pa_log(__FILE__": Failed to parse SDP data: bad address: >%s<.", a); + pa_log("Failed to parse SDP data: bad address: >%s<.", a); goto fail; } @@ -176,7 +176,7 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) { a[strcspn(a, "/")] = 0; if (inet_pton(AF_INET6, a, &((struct sockaddr_in6*) &i->sa)->sin6_addr) <= 0) { - pa_log(__FILE__": Failed to parse SDP data: bad address: >%s<.", a); + pa_log("Failed to parse SDP data: bad address: >%s<.", a); goto fail; } @@ -191,12 +191,12 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) { if (sscanf(t+8, "%i RTP/AVP %i", &_port, &_payload) == 2) { if (_port <= 0 || _port > 0xFFFF) { - pa_log(__FILE__": Failed to parse SDP data: invalid port %i.", _port); + pa_log("Failed to parse SDP data: invalid port %i.", _port); goto fail; } if (_payload < 0 || _payload > 127) { - pa_log(__FILE__": Failed to parse SDP data: invalid payload %i.", _payload); + pa_log("Failed to parse SDP data: invalid payload %i.", _payload); goto fail; } @@ -216,7 +216,7 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) { if (sscanf(t+9, "%i %64c", &_payload, c) == 2) { if (_payload < 0 || _payload > 127) { - pa_log(__FILE__": Failed to parse SDP data: invalid payload %i.", _payload); + pa_log("Failed to parse SDP data: invalid payload %i.", _payload); goto fail; } if (_payload == i->payload) { @@ -237,7 +237,7 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) { } if (!i->origin || (!is_goodbye && (!i->salen || i->payload > 127 || !ss_valid || port == 0))) { - pa_log(__FILE__": Failed to parse SDP data: missing data."); + pa_log("Failed to parse SDP data: missing data."); goto fail; } diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c index e4a90017..8cedc48b 100644 --- a/src/pulse/client-conf-x11.c +++ b/src/pulse/client-conf-x11.c @@ -46,7 +46,7 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) { goto finish; if (!(d = XOpenDisplay(dname))) { - pa_log(__FILE__": XOpenDisplay() failed"); + pa_log("XOpenDisplay() failed"); goto finish; } @@ -69,7 +69,7 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) { uint8_t cookie[PA_NATIVE_COOKIE_LENGTH]; if (pa_parsehex(t, cookie, sizeof(cookie)) != sizeof(cookie)) { - pa_log(__FILE__": failed to parse cookie data"); + pa_log("failed to parse cookie data"); goto finish; } diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c index c3f58ec2..619b11c3 100644 --- a/src/pulse/client-conf.c +++ b/src/pulse/client-conf.c @@ -116,7 +116,7 @@ int pa_client_conf_load(pa_client_conf *c, const char *filename) { pa_open_config_file(DEFAULT_CLIENT_CONFIG_FILE, DEFAULT_CLIENT_CONFIG_FILE_USER, ENV_CLIENT_CONFIG_FILE, &fn, "r"); if (!f && errno != EINTR) { - pa_log(__FILE__": WARNING: failed to open configuration file '%s': %s", fn, pa_cstrerror(errno)); + pa_log("WARNING: failed to open configuration file '%s': %s", fn, pa_cstrerror(errno)); goto finish; } diff --git a/src/pulse/context.c b/src/pulse/context.c index b3530542..df627ee6 100644 --- a/src/pulse/context.c +++ b/src/pulse/context.c @@ -462,7 +462,7 @@ static int context_connect_spawn(pa_context *c) { pa_context_ref(c); if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) { - pa_log(__FILE__": socketpair(): %s", pa_cstrerror(errno)); + pa_log("socketpair(): %s", pa_cstrerror(errno)); pa_context_fail(c, PA_ERR_INTERNAL); goto fail; } @@ -476,7 +476,7 @@ static int context_connect_spawn(pa_context *c) { c->spawn_api.prefork(); if ((pid = fork()) < 0) { - pa_log(__FILE__": fork(): %s", pa_cstrerror(errno)); + pa_log("fork(): %s", pa_cstrerror(errno)); pa_context_fail(c, PA_ERR_INTERNAL); if (c->spawn_api.postfork) @@ -532,7 +532,7 @@ static int context_connect_spawn(pa_context *c) { c->spawn_api.postfork(); if (r < 0) { - pa_log(__FILE__": waitpid(): %s", pa_cstrerror(errno)); + pa_log("waitpid(): %s", pa_cstrerror(errno)); pa_context_fail(c, PA_ERR_INTERNAL); goto fail; } else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { @@ -594,7 +594,7 @@ static int try_next_connection(pa_context *c) { goto finish; } - pa_log_debug(__FILE__": Trying to connect to %s...", u); + pa_log_debug("Trying to connect to %s...", u); pa_xfree(c->server); c->server = pa_xstrdup(u); diff --git a/src/pulse/mainloop-signal.c b/src/pulse/mainloop-signal.c index 11a27cd5..d651462b 100644 --- a/src/pulse/mainloop-signal.c +++ b/src/pulse/mainloop-signal.c @@ -90,12 +90,12 @@ static void callback(pa_mainloop_api*a, pa_io_event*e, int fd, pa_io_event_flags if (errno == EAGAIN) return; - pa_log(__FILE__": read(): %s", pa_cstrerror(errno)); + pa_log("read(): %s", pa_cstrerror(errno)); return; } if (r != sizeof(sig)) { - pa_log(__FILE__": short read()"); + pa_log("short read()"); return; } @@ -107,7 +107,7 @@ int pa_signal_init(pa_mainloop_api *a) { assert(!api && a && signal_pipe[0] == -1 && signal_pipe[1] == -1 && !io_event); if (pipe(signal_pipe) < 0) { - pa_log(__FILE__": pipe(): %s", pa_cstrerror(errno)); + pa_log("pipe(): %s", pa_cstrerror(errno)); return -1; } diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c index 5ebb9bc8..f7b15537 100644 --- a/src/pulse/mainloop.c +++ b/src/pulse/mainloop.c @@ -192,7 +192,7 @@ static pa_io_event* mainloop_io_new( if ((select((SELECT_TYPE_ARG1) fd, NULL, NULL, SELECT_TYPE_ARG234 &xset, SELECT_TYPE_ARG5 &tv) == -1) && (WSAGetLastError() == WSAENOTSOCK)) { - pa_log_warn(__FILE__": WARNING: cannot monitor non-socket file descriptors."); + pa_log_warn("WARNING: cannot monitor non-socket file descriptors."); e->dead = 1; } } @@ -448,7 +448,7 @@ pa_mainloop *pa_mainloop_new(void) { m->wakeup_pipe_type = 0; if (pipe(m->wakeup_pipe) < 0) { - pa_log_error(__FILE__": ERROR: cannot create wakeup pipe"); + pa_log_error("ERROR: cannot create wakeup pipe"); pa_xfree(m); return NULL; } @@ -852,7 +852,7 @@ int pa_mainloop_poll(pa_mainloop *m) { if (errno == EINTR) m->poll_func_ret = 0; else - pa_log(__FILE__": poll(): %s", pa_cstrerror(errno)); + pa_log("poll(): %s", pa_cstrerror(errno)); } } diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c index 34f0f250..b1b180a0 100644 --- a/src/pulse/thread-mainloop.c +++ b/src/pulse/thread-mainloop.c @@ -421,7 +421,7 @@ pa_mainloop_api* pa_threaded_mainloop_get_api(pa_threaded_mainloop*m) { #else /* defined(OS_IS_WIN32) || defined(HAVE_PTHREAD) */ pa_threaded_mainloop *pa_threaded_mainloop_new(void) { - pa_log_error(__FILE__": Threaded main loop not supported on this platform"); + pa_log_error("Threaded main loop not supported on this platform"); return NULL; } diff --git a/src/pulse/util.c b/src/pulse/util.c index b041fec8..c13951da 100644 --- a/src/pulse/util.c +++ b/src/pulse/util.c @@ -112,7 +112,7 @@ char *pa_get_user_name(char *s, size_t l) { char *pa_get_host_name(char *s, size_t l) { assert(s && l > 0); if (gethostname(s, l) < 0) { - pa_log(__FILE__": gethostname(): %s", pa_cstrerror(errno)); + pa_log("gethostname(): %s", pa_cstrerror(errno)); return NULL; } s[l-1] = 0; @@ -138,12 +138,12 @@ char *pa_get_home_dir(char *s, size_t l) { #ifdef HAVE_PWD_H #ifdef HAVE_GETPWUID_R if (getpwuid_r(getuid(), &pw, buf, sizeof(buf), &r) != 0 || !r) { - pa_log(__FILE__": getpwuid_r() failed"); + pa_log("getpwuid_r() failed"); #else /* XXX Not thread-safe, but needed on OSes (e.g. FreeBSD 4.X) * that do not support getpwuid_r. */ if ((r = getpwuid(getuid())) == NULL) { - pa_log(__FILE__": getpwuid_r() failed"); + pa_log("getpwuid_r() failed"); #endif return NULL; } diff --git a/src/pulsecore/authkey.c b/src/pulsecore/authkey.c index a5df3ed1..87631ca5 100644 --- a/src/pulsecore/authkey.c +++ b/src/pulsecore/authkey.c @@ -54,7 +54,7 @@ static int generate(int fd, void *ret_data, size_t length) { ftruncate(fd, 0); if ((r = pa_loop_write(fd, ret_data, length, NULL)) < 0 || (size_t) r != length) { - pa_log(__FILE__": failed to write cookie file: %s", pa_cstrerror(errno)); + pa_log("failed to write cookie file: %s", pa_cstrerror(errno)); return -1; } @@ -76,7 +76,7 @@ static int load(const char *fn, void *data, size_t length) { if ((fd = open(fn, O_RDWR|O_CREAT|O_BINARY, S_IRUSR|S_IWUSR)) < 0) { if (errno != EACCES || (fd = open(fn, O_RDONLY|O_BINARY)) < 0) { - pa_log(__FILE__": failed to open cookie file '%s': %s", fn, pa_cstrerror(errno)); + pa_log("failed to open cookie file '%s': %s", fn, pa_cstrerror(errno)); goto finish; } else writable = 0; @@ -85,15 +85,15 @@ static int load(const char *fn, void *data, size_t length) { unlock = pa_lock_fd(fd, 1) >= 0; if ((r = pa_loop_read(fd, data, length, NULL)) < 0) { - pa_log(__FILE__": failed to read cookie file '%s': %s", fn, pa_cstrerror(errno)); + pa_log("failed to read cookie file '%s': %s", fn, pa_cstrerror(errno)); goto finish; } if ((size_t) r != length) { - pa_log_debug(__FILE__": got %d bytes from cookie file '%s', expected %d", (int)r, fn, (int)length); + pa_log_debug("got %d bytes from cookie file '%s', expected %d", (int)r, fn, (int)length); if (!writable) { - pa_log(__FILE__": unable to write cookie to read only file"); + pa_log("unable to write cookie to read only file"); goto finish; } @@ -125,7 +125,7 @@ int pa_authkey_load(const char *path, void *data, size_t length) { ret = load(path, data, length); if (ret < 0) - pa_log(__FILE__": Failed to load authorization key '%s': %s", path, + pa_log("Failed to load authorization key '%s': %s", path, (ret == -1) ? pa_cstrerror(errno) : "file corrupt"); return ret; @@ -182,14 +182,14 @@ int pa_authkey_save(const char *fn, const void *data, size_t length) { return -2; if ((fd = open(p, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR)) < 0) { - pa_log(__FILE__": failed to open cookie file '%s': %s", fn, pa_cstrerror(errno)); + pa_log("failed to open cookie file '%s': %s", fn, pa_cstrerror(errno)); goto finish; } unlock = pa_lock_fd(fd, 1) >= 0; if ((r = pa_loop_write(fd, data, length, NULL)) < 0 || (size_t) r != length) { - pa_log(__FILE__": failed to read cookie file '%s': %s", fn, pa_cstrerror(errno)); + pa_log("failed to read cookie file '%s': %s", fn, pa_cstrerror(errno)); goto finish; } diff --git a/src/pulsecore/cli.c b/src/pulsecore/cli.c index 7c284066..e3fc2e4c 100644 --- a/src/pulsecore/cli.c +++ b/src/pulsecore/cli.c @@ -104,7 +104,7 @@ static void client_kill(pa_client *client) { assert(client && client->userdata); c = client->userdata; - pa_log_debug(__FILE__": CLI client killed."); + pa_log_debug("CLI client killed."); if (c->defer_kill) c->kill_requested = 1; else { @@ -120,7 +120,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) { assert(line && c); if (!s) { - pa_log_debug(__FILE__": CLI got EOF from user."); + pa_log_debug("CLI got EOF from user."); if (c->eof_callback) c->eof_callback(c, c->userdata); diff --git a/src/pulsecore/client.c b/src/pulsecore/client.c index bf2b13df..c34bf149 100644 --- a/src/pulsecore/client.c +++ b/src/pulsecore/client.c @@ -52,7 +52,7 @@ pa_client *pa_client_new(pa_core *core, const char *driver, const char *name) { r = pa_idxset_put(core->clients, c, &c->index); assert(c->index != PA_IDXSET_INVALID && r >= 0); - pa_log_info(__FILE__": created %u \"%s\"", c->index, c->name); + pa_log_info("created %u \"%s\"", c->index, c->name); pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_NEW, c->index); pa_core_check_quit(core); @@ -67,7 +67,7 @@ void pa_client_free(pa_client *c) { pa_core_check_quit(c->core); - pa_log_info(__FILE__": freed %u \"%s\"", c->index, c->name); + pa_log_info("freed %u \"%s\"", c->index, c->name); pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_REMOVE, c->index); pa_xfree(c->name); pa_xfree(c->driver); @@ -77,7 +77,7 @@ void pa_client_free(pa_client *c) { void pa_client_kill(pa_client *c) { assert(c); if (!c->kill) { - pa_log_warn(__FILE__": kill() operation not implemented for client %u", c->index); + pa_log_warn("kill() operation not implemented for client %u", c->index); return; } @@ -87,7 +87,7 @@ void pa_client_kill(pa_client *c) { void pa_client_set_name(pa_client *c, const char *name) { assert(c); - pa_log_info(__FILE__": client %u changed name from \"%s\" to \"%s\"", c->index, c->name, name); + pa_log_info("client %u changed name from \"%s\" to \"%s\"", c->index, c->name, name); pa_xfree(c->name); c->name = pa_xstrdup(name); diff --git a/src/pulsecore/conf-parser.c b/src/pulsecore/conf-parser.c index cc471ff9..db1e3719 100644 --- a/src/pulsecore/conf-parser.c +++ b/src/pulsecore/conf-parser.c @@ -47,7 +47,7 @@ static int next_assignment(const char *filename, unsigned line, const pa_config_ if (!strcmp(lvalue, t->lvalue)) return t->parse(filename, line, lvalue, rvalue, t->data, userdata); - pa_log(__FILE__": [%s:%u] Unknown lvalue '%s'.", filename, line, lvalue); + pa_log("[%s:%u] Unknown lvalue '%s'.", filename, line, lvalue); return -1; } @@ -90,7 +90,7 @@ static int parse_line(const char *filename, unsigned line, const pa_config_item return 0; if (!(e = strchr(b, '='))) { - pa_log(__FILE__": [%s:%u] Missing '='.", filename, line); + pa_log("[%s:%u] Missing '='.", filename, line); return -1; } @@ -113,7 +113,7 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, void goto finish; } - pa_log_warn(__FILE__": WARNING: failed to open configuration file '%s': %s", + pa_log_warn("WARNING: failed to open configuration file '%s': %s", filename, pa_cstrerror(errno)); goto finish; } @@ -124,7 +124,7 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, void if (feof(f)) break; - pa_log_warn(__FILE__": WARNING: failed to read configuration file '%s': %s", + pa_log_warn("WARNING: failed to read configuration file '%s': %s", filename, pa_cstrerror(errno)); goto finish; } @@ -149,7 +149,7 @@ int pa_config_parse_int(const char *filename, unsigned line, const char *lvalue, assert(filename && lvalue && rvalue && data); if (pa_atoi(rvalue, &k) < 0) { - pa_log(__FILE__": [%s:%u] Failed to parse numeric value: %s", filename, line, rvalue); + pa_log("[%s:%u] Failed to parse numeric value: %s", filename, line, rvalue); return -1; } @@ -162,7 +162,7 @@ int pa_config_parse_bool(const char *filename, unsigned line, const char *lvalue assert(filename && lvalue && rvalue && data); if ((k = pa_parse_boolean(rvalue)) < 0) { - pa_log(__FILE__": [%s:%u] Failed to parse boolean value: %s", filename, line, rvalue); + pa_log("[%s:%u] Failed to parse boolean value: %s", filename, line, rvalue); return -1; } diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c index ca2408fe..e3bf3ca2 100644 --- a/src/pulsecore/core-scache.c +++ b/src/pulsecore/core-scache.c @@ -360,7 +360,7 @@ static void add_file(pa_core *c, const char *pathname) { e = pa_path_get_filename(pathname); if (stat(pathname, &st) < 0) { - pa_log(__FILE__": stat('%s'): %s", pathname, pa_cstrerror(errno)); + pa_log("stat('%s'): %s", pathname, pa_cstrerror(errno)); return; } @@ -382,7 +382,7 @@ int pa_scache_add_directory_lazy(pa_core *c, const char *pathname) { /* If that fails, try to open it as shell glob */ if (glob(pathname, GLOB_ERR|GLOB_NOSORT, NULL, &p) < 0) { - pa_log(__FILE__": failed to open directory '%s': %s", pathname, pa_cstrerror(errno)); + pa_log("failed to open directory '%s': %s", pathname, pa_cstrerror(errno)); return -1; } diff --git a/src/pulsecore/core-subscribe.c b/src/pulsecore/core-subscribe.c index 37673da5..4df1d511 100644 --- a/src/pulsecore/core-subscribe.c +++ b/src/pulsecore/core-subscribe.c @@ -145,7 +145,7 @@ static void dump_event(const char * prefix, pa_subscription_event*e) { [PA_SUBSCRIPTION_EVENT_REMOVE] = "REMOVE" }; - pa_log(__FILE__": %s event (%s|%s|%u)", + pa_log("%s event (%s|%s|%u)", prefix, fac_table[e->type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK], type_table[e->type & PA_SUBSCRIPTION_EVENT_TYPE_MASK], @@ -234,7 +234,7 @@ void pa_subscription_post(pa_core *c, pa_subscription_event_type_t t, uint32_t i * entry in the queue. */ free_event(i); - pa_log_debug(__FILE__": dropped redundant event."); + pa_log_debug("dropped redundant event."); continue; } @@ -242,7 +242,7 @@ void pa_subscription_post(pa_core *c, pa_subscription_event_type_t t, uint32_t i /* This object has changed. If a "new" or "change" event for * this object is still in the queue we can exit. */ - pa_log_debug(__FILE__": dropped redundant event."); + pa_log_debug("dropped redundant event."); return; } } diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 595ef939..b504b6d3 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -128,10 +128,10 @@ void pa_make_nonblock_fd(int fd) { u_long arg = 1; if (ioctlsocket(fd, FIONBIO, &arg) < 0) { if (WSAGetLastError() == WSAENOTSOCK) - pa_log_warn(__FILE__": WARNING: Only sockets can be made non-blocking!"); + pa_log_warn("WARNING: Only sockets can be made non-blocking!"); } #else - pa_log_warn(__FILE__": WARNING: Non-blocking I/O not supported.!"); + pa_log_warn("WARNING: Non-blocking I/O not supported.!"); #endif } @@ -359,7 +359,7 @@ void pa_check_signal_is_blocked(int sig) { if (pthread_sigmask(SIG_SETMASK, NULL, &set) < 0) { #endif if (sigprocmask(SIG_SETMASK, NULL, &set) < 0) { - pa_log(__FILE__": sigprocmask(): %s", pa_cstrerror(errno)); + pa_log("sigprocmask(): %s", pa_cstrerror(errno)); return; } #ifdef HAVE_PTHREAD @@ -372,16 +372,16 @@ void pa_check_signal_is_blocked(int sig) { /* Check whether the signal is trapped */ if (sigaction(sig, NULL, &sa) < 0) { - pa_log(__FILE__": sigaction(): %s", pa_cstrerror(errno)); + pa_log("sigaction(): %s", pa_cstrerror(errno)); return; } if (sa.sa_handler != SIG_DFL) return; - pa_log(__FILE__": WARNING: %s is not trapped. This might cause malfunction!", pa_strsignal(sig)); + pa_log("WARNING: %s is not trapped. This might cause malfunction!", pa_strsignal(sig)); #else /* HAVE_SIGACTION */ - pa_log(__FILE__": WARNING: %s might not be trapped. This might cause malfunction!", pa_strsignal(sig)); + pa_log("WARNING: %s might not be trapped. This might cause malfunction!", pa_strsignal(sig)); #endif } @@ -460,9 +460,9 @@ void pa_raise_priority(void) { #ifdef HAVE_SYS_RESOURCE_H if (setpriority(PRIO_PROCESS, 0, NICE_LEVEL) < 0) - pa_log_warn(__FILE__": setpriority(): %s", pa_cstrerror(errno)); + pa_log_warn("setpriority(): %s", pa_cstrerror(errno)); else - pa_log_info(__FILE__": Successfully gained nice level %i.", NICE_LEVEL); + pa_log_info("Successfully gained nice level %i.", NICE_LEVEL); #endif #ifdef _POSIX_PRIORITY_SCHEDULING @@ -470,25 +470,25 @@ void pa_raise_priority(void) { struct sched_param sp; if (sched_getparam(0, &sp) < 0) { - pa_log(__FILE__": sched_getparam(): %s", pa_cstrerror(errno)); + pa_log("sched_getparam(): %s", pa_cstrerror(errno)); return; } sp.sched_priority = 1; if (sched_setscheduler(0, SCHED_FIFO, &sp) < 0) { - pa_log_warn(__FILE__": sched_setscheduler(): %s", pa_cstrerror(errno)); + pa_log_warn("sched_setscheduler(): %s", pa_cstrerror(errno)); return; } - pa_log_info(__FILE__": Successfully enabled SCHED_FIFO scheduling."); + pa_log_info("Successfully enabled SCHED_FIFO scheduling."); } #endif #ifdef OS_IS_WIN32 if (!SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS)) - pa_log_warn(__FILE__": SetPriorityClass() failed: 0x%08X", GetLastError()); + pa_log_warn("SetPriorityClass() failed: 0x%08X", GetLastError()); else - pa_log_info(__FILE__": Successfully gained high priority class."); + pa_log_info("Successfully gained high priority class."); #endif } @@ -627,7 +627,7 @@ static int is_group(gid_t gid, const char *name) { data = pa_xmalloc(n); if (getgrgid_r(gid, &group, data, n, &result) < 0 || !result) { - pa_log(__FILE__": getgrgid_r(%u): %s", (unsigned)gid, pa_cstrerror(errno)); + pa_log("getgrgid_r(%u): %s", (unsigned)gid, pa_cstrerror(errno)); goto finish; } @@ -639,7 +639,7 @@ finish: /* XXX Not thread-safe, but needed on OSes (e.g. FreeBSD 4.X) that do not * support getgrgid_r. */ if ((result = getgrgid(gid)) == NULL) { - pa_log(__FILE__": getgrgid(%u): %s", gid, pa_cstrerror(errno)); + pa_log("getgrgid(%u): %s", gid, pa_cstrerror(errno)); goto finish; } @@ -662,7 +662,7 @@ int pa_own_uid_in_group(const char *name, gid_t *gid) { gids = pa_xmalloc(sizeof(GETGROUPS_T)*n); if ((n = getgroups(n, gids)) < 0) { - pa_log(__FILE__": getgroups(): %s", pa_cstrerror(errno)); + pa_log("getgroups(): %s", pa_cstrerror(errno)); goto finish; } @@ -803,7 +803,7 @@ int pa_lock_fd(int fd, int b) { return 0; } - pa_log(__FILE__": %slock: %s", !b? "un" : "", + pa_log("%slock: %s", !b? "un" : "", pa_cstrerror(errno)); #endif @@ -815,7 +815,7 @@ int pa_lock_fd(int fd, int b) { if (!b && UnlockFile(h, 0, 0, 0xFFFFFFFF, 0xFFFFFFFF)) return 0; - pa_log(__FILE__": %slock failed: 0x%08X", !b ? "un" : "", GetLastError()); + pa_log("%slock failed: 0x%08X", !b ? "un" : "", GetLastError()); #endif return -1; @@ -838,18 +838,18 @@ int pa_lock_lockfile(const char *fn) { struct stat st; if ((fd = open(fn, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR)) < 0) { - pa_log(__FILE__": failed to create lock file '%s': %s", fn, + pa_log("failed to create lock file '%s': %s", fn, pa_cstrerror(errno)); goto fail; } if (pa_lock_fd(fd, 1) < 0) { - pa_log(__FILE__": failed to lock file '%s'.", fn); + pa_log("failed to lock file '%s'.", fn); goto fail; } if (fstat(fd, &st) < 0) { - pa_log(__FILE__": failed to fstat() file '%s'.", fn); + pa_log("failed to fstat() file '%s'.", fn); goto fail; } @@ -858,12 +858,12 @@ int pa_lock_lockfile(const char *fn) { break; if (pa_lock_fd(fd, 0) < 0) { - pa_log(__FILE__": failed to unlock file '%s'.", fn); + pa_log("failed to unlock file '%s'.", fn); goto fail; } if (close(fd) < 0) { - pa_log(__FILE__": failed to close file '%s'.", fn); + pa_log("failed to close file '%s'.", fn); goto fail; } @@ -886,18 +886,18 @@ int pa_unlock_lockfile(const char *fn, int fd) { assert(fn && fd >= 0); if (unlink(fn) < 0) { - pa_log_warn(__FILE__": WARNING: unable to remove lock file '%s': %s", + pa_log_warn("WARNING: unable to remove lock file '%s': %s", fn, pa_cstrerror(errno)); r = -1; } if (pa_lock_fd(fd, 0) < 0) { - pa_log_warn(__FILE__": WARNING: failed to unlock file '%s'.", fn); + pa_log_warn("WARNING: failed to unlock file '%s'.", fn); r = -1; } if (close(fd) < 0) { - pa_log_warn(__FILE__": WARNING: failed to close lock file '%s': %s", + pa_log_warn("WARNING: failed to close lock file '%s': %s", fn, pa_cstrerror(errno)); r = -1; } diff --git a/src/pulsecore/ioline.c b/src/pulsecore/ioline.c index 9c9900f8..a3bca22f 100644 --- a/src/pulsecore/ioline.c +++ b/src/pulsecore/ioline.c @@ -292,7 +292,7 @@ static int do_read(pa_ioline *l) { /* Read some data */ if ((r = pa_iochannel_read(l->io, l->rbuf+l->rbuf_index+l->rbuf_valid_length, len)) <= 0) { if (r < 0) { - pa_log(__FILE__": read(): %s", pa_cstrerror(errno)); + pa_log("read(): %s", pa_cstrerror(errno)); failure(l, 0); } else failure(l, 1); @@ -317,7 +317,7 @@ static int do_write(pa_ioline *l) { while (!l->dead && pa_iochannel_is_writable(l->io) && l->wbuf_valid_length) { if ((r = pa_iochannel_write(l->io, l->wbuf+l->wbuf_index, l->wbuf_valid_length)) < 0) { - pa_log(__FILE__": write(): %s", r < 0 ? pa_cstrerror(errno) : "EOF"); + pa_log("write(): %s", r < 0 ? pa_cstrerror(errno) : "EOF"); failure(l, 0); return -1; } diff --git a/src/pulsecore/ipacl.c b/src/pulsecore/ipacl.c index 15b6b3f9..36159fab 100644 --- a/src/pulsecore/ipacl.c +++ b/src/pulsecore/ipacl.c @@ -88,7 +88,7 @@ pa_ip_acl* pa_ip_acl_new(const char *s) { *slash = 0; slash++; if (pa_atou(slash, &bits) < 0) { - pa_log(__FILE__": failed to parse number of bits: %s", slash); + pa_log("failed to parse number of bits: %s", slash); goto fail; } } else @@ -99,21 +99,21 @@ pa_ip_acl* pa_ip_acl_new(const char *s) { e.bits = bits == (uint32_t) -1 ? 32 : (int) bits; if (e.bits > 32) { - pa_log(__FILE__": number of bits out of range: %i", e.bits); + pa_log("number of bits out of range: %i", e.bits); goto fail; } e.family = AF_INET; if (e.bits < 32 && (uint32_t) (ntohl(e.address_ipv4.s_addr) << e.bits) != 0) - pa_log_warn(__FILE__": WARNING: Host part of ACL entry '%s/%u' is not zero!", a, e.bits); + pa_log_warn("WARNING: Host part of ACL entry '%s/%u' is not zero!", a, e.bits); } else if (inet_pton(AF_INET6, a, &e.address_ipv6) > 0) { e.bits = bits == (uint32_t) -1 ? 128 : (int) bits; if (e.bits > 128) { - pa_log(__FILE__": number of bits out of range: %i", e.bits); + pa_log("number of bits out of range: %i", e.bits); goto fail; } e.family = AF_INET6; @@ -135,11 +135,11 @@ pa_ip_acl* pa_ip_acl_new(const char *s) { } if (t) - pa_log_warn(__FILE__": WARNING: Host part of ACL entry '%s/%u' is not zero!", a, e.bits); + pa_log_warn("WARNING: Host part of ACL entry '%s/%u' is not zero!", a, e.bits); } } else { - pa_log(__FILE__": failed to parse address: %s", a); + pa_log("failed to parse address: %s", a); goto fail; } diff --git a/src/pulsecore/memblock.c b/src/pulsecore/memblock.c index 4ce1b7c1..2109d83c 100644 --- a/src/pulsecore/memblock.c +++ b/src/pulsecore/memblock.c @@ -184,7 +184,7 @@ static struct mempool_slot* mempool_allocate_slot(pa_mempool *p) { } else if (p->n_init < p->n_blocks) slot = (struct mempool_slot*) ((uint8_t*) p->memory.ptr + (p->block_size * p->n_init++)); else { - pa_log_debug(__FILE__": Pool full"); + pa_log_debug("Pool full"); p->stat.n_pool_full++; return NULL; } @@ -241,7 +241,7 @@ pa_memblock *pa_memblock_new_pool(pa_mempool *p, size_t length) { b->type = PA_MEMBLOCK_POOL_EXTERNAL; b->data = mempool_slot_data(slot); } else { - pa_log_debug(__FILE__": Memory block to large for pool: %u > %u", length, p->block_size - sizeof(struct mempool_slot)); + pa_log_debug("Memory block to large for pool: %u > %u", length, p->block_size - sizeof(struct mempool_slot)); p->stat.n_too_large_for_pool++; return NULL; } @@ -464,7 +464,7 @@ void pa_mempool_free(pa_mempool *p) { pa_memexport_free(p->exports); if (p->stat.n_allocated > 0) - pa_log_warn(__FILE__": WARNING! Memory pool destroyed but not all memory blocks freed!"); + pa_log_warn("WARNING! Memory pool destroyed but not all memory blocks freed!"); pa_shm_free(&p->memory); pa_xfree(p); diff --git a/src/pulsecore/memblockq.c b/src/pulsecore/memblockq.c index 2fd38850..e6b73fc5 100644 --- a/src/pulsecore/memblockq.c +++ b/src/pulsecore/memblockq.c @@ -74,7 +74,7 @@ pa_memblockq* pa_memblockq_new( bq->base = base; bq->read_index = bq->write_index = idx; - pa_log_debug(__FILE__": memblockq requested: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu", + pa_log_debug("memblockq requested: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu", (unsigned long)maxlength, (unsigned long)tlength, (unsigned long)base, (unsigned long)prebuf, (unsigned long)minreq); bq->maxlength = ((maxlength+base-1)/base)*base; @@ -97,7 +97,7 @@ pa_memblockq* pa_memblockq_new( if (!bq->minreq) bq->minreq = 1; - pa_log_debug(__FILE__": memblockq sanitized: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu", + pa_log_debug("memblockq sanitized: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu", (unsigned long)bq->maxlength, (unsigned long)bq->tlength, (unsigned long)bq->base, (unsigned long)bq->prebuf, (unsigned long)bq->minreq); bq->state = bq->prebuf ? PREBUF : RUNNING; diff --git a/src/pulsecore/modinfo.c b/src/pulsecore/modinfo.c index adefdb46..00720113 100644 --- a/src/pulsecore/modinfo.c +++ b/src/pulsecore/modinfo.c @@ -73,7 +73,7 @@ pa_modinfo *pa_modinfo_get_by_name(const char *name) { assert(name); if (!(dl = lt_dlopenext(name))) { - pa_log(__FILE__": Failed to open module \"%s\": %s", name, lt_dlerror()); + pa_log("Failed to open module \"%s\": %s", name, lt_dlerror()); return NULL; } diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c index cdf95ada..ea3d726e 100644 --- a/src/pulsecore/module.c +++ b/src/pulsecore/module.c @@ -112,17 +112,17 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) { m->argument = pa_xstrdup(argument); if (!(m->dl = lt_dlopenext(name))) { - pa_log(__FILE__": Failed to open module \"%s\": %s", name, lt_dlerror()); + pa_log("Failed to open module \"%s\": %s", name, lt_dlerror()); goto fail; } if (!(m->init = (int (*)(pa_core *_c, pa_module*_m)) load_sym(m->dl, name, PA_SYMBOL_INIT))) { - pa_log(__FILE__": Failed to load module \"%s\": symbol \""PA_SYMBOL_INIT"\" not found.", name); + pa_log("Failed to load module \"%s\": symbol \""PA_SYMBOL_INIT"\" not found.", name); goto fail; } if (!(m->done = (void (*)(pa_core *_c, pa_module*_m)) load_sym(m->dl, name, PA_SYMBOL_DONE))) { - pa_log(__FILE__": Failed to load module \"%s\": symbol \""PA_SYMBOL_DONE"\" not found.", name); + pa_log("Failed to load module \"%s\": symbol \""PA_SYMBOL_DONE"\" not found.", name); goto fail; } @@ -134,7 +134,7 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) { assert(m->init); if (m->init(c, m) < 0) { - pa_log_error(__FILE__": Failed to load module \"%s\" (argument: \"%s\"): initialization failed.", name, argument ? argument : ""); + pa_log_error("Failed to load module \"%s\" (argument: \"%s\"): initialization failed.", name, argument ? argument : ""); goto fail; } @@ -153,7 +153,7 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) { r = pa_idxset_put(c->modules, m, &m->index); assert(r >= 0 && m->index != PA_IDXSET_INVALID); - pa_log_info(__FILE__": Loaded \"%s\" (index: #%u; argument: \"%s\").", m->name, m->index, m->argument ? m->argument : ""); + pa_log_info("Loaded \"%s\" (index: #%u; argument: \"%s\").", m->name, m->index, m->argument ? m->argument : ""); pa_subscription_post(c, PA_SUBSCRIPTION_EVENT_MODULE|PA_SUBSCRIPTION_EVENT_NEW, m->index); @@ -180,13 +180,13 @@ static void pa_module_free(pa_module *m) { if (m->core->disallow_module_loading) return; - pa_log_info(__FILE__": Unloading \"%s\" (index: #%u).", m->name, m->index); + pa_log_info("Unloading \"%s\" (index: #%u).", m->name, m->index); m->done(m->core, m); lt_dlclose(m->dl); - pa_log_info(__FILE__": Unloaded \"%s\" (index: #%u).", m->name, m->index); + pa_log_info("Unloaded \"%s\" (index: #%u).", m->name, m->index); pa_subscription_post(m->core, PA_SUBSCRIPTION_EVENT_MODULE|PA_SUBSCRIPTION_EVENT_REMOVE, m->index); diff --git a/src/pulsecore/pdispatch.c b/src/pulsecore/pdispatch.c index e1653d64..6ecf710a 100644 --- a/src/pulsecore/pdispatch.c +++ b/src/pulsecore/pdispatch.c @@ -205,7 +205,7 @@ int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*packet, const pa_creds *creds, if (!(p = command_names[command])) snprintf((char*) (p = t), sizeof(t), "%u", command); - pa_log(__FILE__": Recieved opcode <%s>", p); + pa_log("Recieved opcode <%s>", p); } #endif @@ -226,7 +226,7 @@ int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*packet, const pa_creds *creds, (*c)(pd, command, tag, ts, userdata); } else { - pa_log(__FILE__": Recieved unsupported command %u", command); + pa_log("Recieved unsupported command %u", command); goto finish; } diff --git a/src/pulsecore/pid.c b/src/pulsecore/pid.c index 044d223d..6e0c085e 100644 --- a/src/pulsecore/pid.c +++ b/src/pulsecore/pid.c @@ -57,7 +57,7 @@ static pid_t read_pid(const char *fn, int fd) { assert(fn && fd >= 0); if ((r = pa_loop_read(fd, t, sizeof(t)-1, NULL)) < 0) { - pa_log_warn(__FILE__": WARNING: failed to read PID file '%s': %s", + pa_log_warn("WARNING: failed to read PID file '%s': %s", fn, pa_cstrerror(errno)); return (pid_t) -1; } @@ -70,7 +70,7 @@ static pid_t read_pid(const char *fn, int fd) { *e = 0; if (pa_atou(t, &pid) < 0) { - pa_log(__FILE__": WARNING: failed to parse PID file '%s'", fn); + pa_log("WARNING: failed to parse PID file '%s'", fn); return (pid_t) -1; } @@ -85,7 +85,7 @@ static int open_pid_file(const char *fn, int mode) { if ((fd = open(fn, mode, S_IRUSR|S_IWUSR)) < 0) { if (mode != O_RDONLY || errno != ENOENT) - pa_log_warn(__FILE__": WARNING: failed to open PID file '%s': %s", + pa_log_warn("WARNING: failed to open PID file '%s': %s", fn, pa_cstrerror(errno)); goto fail; } @@ -95,7 +95,7 @@ static int open_pid_file(const char *fn, int mode) { goto fail; if (fstat(fd, &st) < 0) { - pa_log_warn(__FILE__": WARNING: failed to fstat() PID file '%s': %s", + pa_log_warn("WARNING: failed to fstat() PID file '%s': %s", fn, pa_cstrerror(errno)); goto fail; } @@ -108,7 +108,7 @@ static int open_pid_file(const char *fn, int mode) { goto fail; if (close(fd) < 0) { - pa_log_warn(__FILE__": WARNING: failed to close file '%s': %s", + pa_log_warn("WARNING: failed to close file '%s': %s", fn, pa_cstrerror(errno)); goto fail; } @@ -147,7 +147,7 @@ int pa_pid_file_create(void) { goto fail; if ((pid = read_pid(fn, fd)) == (pid_t) -1) - pa_log(__FILE__": corrupt PID file, overwriting."); + pa_log("corrupt PID file, overwriting."); else if (pid > 0) { #ifdef OS_IS_WIN32 if ((process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid)) != NULL) { @@ -155,16 +155,16 @@ int pa_pid_file_create(void) { #else if (kill(pid, 0) >= 0 || errno != ESRCH) { #endif - pa_log(__FILE__": daemon already running."); + pa_log("daemon already running."); goto fail; } - pa_log(__FILE__": stale PID file, overwriting."); + pa_log("stale PID file, overwriting."); } /* Overwrite the current PID file */ if (lseek(fd, 0, SEEK_SET) == (off_t) -1 || ftruncate(fd, 0) < 0) { - pa_log(__FILE__": failed to truncate PID file '%s': %s", + pa_log("failed to truncate PID file '%s': %s", fn, pa_cstrerror(errno)); goto fail; } @@ -173,7 +173,7 @@ int pa_pid_file_create(void) { l = strlen(t); if (pa_loop_write(fd, t, l, NULL) != (ssize_t) l) { - pa_log(__FILE__": failed to write PID file."); + pa_log("failed to write PID file."); goto fail; } @@ -198,7 +198,7 @@ int pa_pid_file_remove(void) { pa_runtime_path("pid", fn, sizeof(fn)); if ((fd = open_pid_file(fn, O_RDWR)) < 0) { - pa_log_warn(__FILE__": WARNING: failed to open PID file '%s': %s", + pa_log_warn("WARNING: failed to open PID file '%s': %s", fn, pa_cstrerror(errno)); goto fail; } @@ -207,12 +207,12 @@ int pa_pid_file_remove(void) { goto fail; if (pid != getpid()) { - pa_log(__FILE__": WARNING: PID file '%s' not mine!", fn); + pa_log("WARNING: PID file '%s' not mine!", fn); goto fail; } if (ftruncate(fd, 0) < 0) { - pa_log_warn(__FILE__": WARNING: failed to truncate PID file '%s': %s", + pa_log_warn("WARNING: failed to truncate PID file '%s': %s", fn, pa_cstrerror(errno)); goto fail; } @@ -224,7 +224,7 @@ int pa_pid_file_remove(void) { #endif if (unlink(fn) < 0) { - pa_log_warn(__FILE__": WARNING: failed to remove PID file '%s': %s", + pa_log_warn("WARNING: failed to remove PID file '%s': %s", fn, pa_cstrerror(errno)); goto fail; } diff --git a/src/pulsecore/protocol-cli.c b/src/pulsecore/protocol-cli.c index c5854f1e..81ce5e8f 100644 --- a/src/pulsecore/protocol-cli.c +++ b/src/pulsecore/protocol-cli.c @@ -56,7 +56,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) assert(s && io && p); if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) { - pa_log(__FILE__": Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS); + pa_log("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS); pa_iochannel_free(io); return; } diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c index 2fadeca3..c96a98b9 100644 --- a/src/pulsecore/protocol-esound.c +++ b/src/pulsecore/protocol-esound.c @@ -294,7 +294,7 @@ static int esd_proto_connect(struct connection *c, PA_GCC_UNUSED esd_proto_t req if (!c->authorized) { if (memcmp(data, c->protocol->esd_key, ESD_KEY_LEN) != 0) { - pa_log(__FILE__": kicked client with invalid authorization key."); + pa_log("kicked client with invalid authorization key."); return -1; } @@ -313,7 +313,7 @@ static int esd_proto_connect(struct connection *c, PA_GCC_UNUSED esd_proto_t req else if (ekey == ESD_SWAP_ENDIAN_KEY) c->swap_byte_order = 1; else { - pa_log(__FILE__": client sent invalid endian key"); + pa_log("client sent invalid endian key"); return -1; } @@ -421,19 +421,19 @@ static int esd_proto_stream_record(struct connection *c, esd_proto_t request, co pa_sink* sink; if (!(sink = pa_namereg_get(c->protocol->core, c->protocol->sink_name, PA_NAMEREG_SINK, 1))) { - pa_log(__FILE__": no such sink."); + pa_log("no such sink."); return -1; } if (!(source = sink->monitor_source)) { - pa_log(__FILE__": no such monitor source."); + pa_log("no such monitor source."); return -1; } } else { assert(request == ESD_PROTO_STREAM_REC); if (!(source = pa_namereg_get(c->protocol->core, c->protocol->source_name, PA_NAMEREG_SOURCE, 1))) { - pa_log(__FILE__": no such source."); + pa_log("no such source."); return -1; } } @@ -822,7 +822,7 @@ static int do_read(struct connection *c) { assert(c->read_data_length < sizeof(c->request)); if ((r = pa_iochannel_read(c->io, ((uint8_t*) &c->request) + c->read_data_length, sizeof(c->request) - c->read_data_length)) <= 0) { - pa_log_debug(__FILE__": read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF"); + pa_log_debug("read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF"); return -1; } @@ -832,16 +832,16 @@ static int do_read(struct connection *c) { c->request = MAYBE_INT32_SWAP(c->swap_byte_order, c->request); if (c->request < ESD_PROTO_CONNECT || c->request > ESD_PROTO_MAX) { - pa_log(__FILE__": recieved invalid request."); + pa_log("recieved invalid request."); return -1; } handler = proto_map+c->request; -/* pa_log(__FILE__": executing request #%u", c->request); */ +/* pa_log("executing request #%u", c->request); */ if (!handler->proc) { - pa_log(__FILE__": recieved unimplemented request #%u.", c->request); + pa_log("recieved unimplemented request #%u.", c->request); return -1; } @@ -870,7 +870,7 @@ static int do_read(struct connection *c) { assert(c->read_data && c->read_data_length < handler->data_length); if ((r = pa_iochannel_read(c->io, (uint8_t*) c->read_data + c->read_data_length, handler->data_length - c->read_data_length)) <= 0) { - pa_log_debug(__FILE__": read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF"); + pa_log_debug("read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF"); return -1; } @@ -890,7 +890,7 @@ static int do_read(struct connection *c) { assert(c->scache.memchunk.memblock && c->scache.name && c->scache.memchunk.index < c->scache.memchunk.length); if ((r = pa_iochannel_read(c->io, (uint8_t*) c->scache.memchunk.memblock->data+c->scache.memchunk.index, c->scache.memchunk.length-c->scache.memchunk.index)) <= 0) { - pa_log_debug(__FILE__": read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF"); + pa_log_debug("read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF"); return -1; } @@ -945,7 +945,7 @@ static int do_read(struct connection *c) { } if ((r = pa_iochannel_read(c->io, (uint8_t*) c->playback.current_memblock->data+c->playback.memblock_index, l)) <= 0) { - pa_log_debug(__FILE__": read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF"); + pa_log_debug("read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF"); return -1; } @@ -975,7 +975,7 @@ static int do_write(struct connection *c) { assert(c->write_data_index < c->write_data_length); if ((r = pa_iochannel_write(c->io, (uint8_t*) c->write_data+c->write_data_index, c->write_data_length-c->write_data_index)) < 0) { - pa_log(__FILE__": write(): %s", pa_cstrerror(errno)); + pa_log("write(): %s", pa_cstrerror(errno)); return -1; } @@ -994,7 +994,7 @@ static int do_write(struct connection *c) { if ((r = pa_iochannel_write(c->io, (uint8_t*) chunk.memblock->data+chunk.index, chunk.length)) < 0) { pa_memblock_unref(chunk.memblock); - pa_log(__FILE__": write(): %s", pa_cstrerror(errno)); + pa_log("write(): %s", pa_cstrerror(errno)); return -1; } @@ -1154,7 +1154,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) assert(s && io && p); if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) { - pa_log(__FILE__": Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS); + pa_log("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS); pa_iochannel_free(io); return; } @@ -1203,7 +1203,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) c->original_name = NULL; if (!c->authorized && p->auth_ip_acl && pa_ip_acl_check(p->auth_ip_acl, pa_iochannel_get_recv_fd(io)) > 0) { - pa_log_info(__FILE__": Client authenticated by IP ACL."); + pa_log_info("Client authenticated by IP ACL."); c->authorized = 1; } @@ -1237,7 +1237,7 @@ pa_protocol_esound* pa_protocol_esound_new(pa_core*core, pa_socket_server *serve p = pa_xnew(pa_protocol_esound, 1); if (pa_modargs_get_value_boolean(ma, "auth-anonymous", &public) < 0) { - pa_log(__FILE__": auth-anonymous= expects a boolean argument."); + pa_log("auth-anonymous= expects a boolean argument."); goto fail; } @@ -1247,7 +1247,7 @@ pa_protocol_esound* pa_protocol_esound_new(pa_core*core, pa_socket_server *serve if ((acl = pa_modargs_get_value(ma, "auth-ip-acl", NULL))) { if (!(p->auth_ip_acl = pa_ip_acl_new(acl))) { - pa_log(__FILE__": Failed to parse IP ACL '%s'", acl); + pa_log("Failed to parse IP ACL '%s'", acl); goto fail; } } else diff --git a/src/pulsecore/protocol-http.c b/src/pulsecore/protocol-http.c index d0d92629..3b1207f6 100644 --- a/src/pulsecore/protocol-http.c +++ b/src/pulsecore/protocol-http.c @@ -145,7 +145,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) { /* We're done */ c->state = DATA; - pa_log_info(__FILE__": request for %s", c->url); + pa_log_info("request for %s", c->url); if (!strcmp(c->url, URL_ROOT)) { char txt[256]; @@ -224,7 +224,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) assert(s && io && p); if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) { - pa_log_warn(__FILE__": Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS); + pa_log_warn("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS); pa_iochannel_free(io); return; } diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 2c9b3566..506442f5 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -542,7 +542,7 @@ static void request_bytes(struct playback_stream *s) { pa_tagstruct_putu32(t, l); pa_pstream_send_tagstruct(s->connection->pstream, t); -/* pa_log(__FILE__": Requesting %u bytes", l); */ +/* pa_log("Requesting %u bytes", l); */ } static void send_memblock(struct connection *c) { @@ -620,11 +620,11 @@ static int sink_input_peek_cb(pa_sink_input *i, pa_memchunk *chunk) { } if (pa_memblockq_peek(s->memblockq, chunk) < 0) { -/* pa_log(__FILE__": peek: failure"); */ +/* pa_log("peek: failure"); */ return -1; } -/* pa_log(__FILE__": peek: %u", chunk->length); */ +/* pa_log("peek: %u", chunk->length); */ return 0; } @@ -643,7 +643,7 @@ static void sink_input_drop_cb(pa_sink_input *i, const pa_memchunk *chunk, size_ s->drain_request = 0; } -/* pa_log(__FILE__": after_drop: %u %u", pa_memblockq_get_length(s->memblockq), pa_memblockq_is_readable(s->memblockq)); */ +/* pa_log("after_drop: %u %u", pa_memblockq_get_length(s->memblockq), pa_memblockq_is_readable(s->memblockq)); */ } static void sink_input_kill_cb(pa_sink_input *i) { @@ -657,7 +657,7 @@ static pa_usec_t sink_input_get_latency_cb(pa_sink_input *i) { assert(i && i->userdata); s = i->userdata; - /*pa_log(__FILE__": get_latency: %u", pa_memblockq_get_length(s->memblockq));*/ + /*pa_log("get_latency: %u", pa_memblockq_get_length(s->memblockq));*/ return pa_bytes_to_usec(pa_memblockq_get_length(s->memblockq), &s->sink_input->sample_spec); } @@ -670,7 +670,7 @@ static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk) s = o->userdata; if (pa_memblockq_push_align(s->memblockq, chunk) < 0) { - pa_log_warn(__FILE__": Failed to push data into output queue."); + pa_log_warn("Failed to push data into output queue."); return; } @@ -689,7 +689,7 @@ static pa_usec_t source_output_get_latency_cb(pa_source_output *o) { assert(o && o->userdata); s = o->userdata; - /*pa_log(__FILE__": get_latency: %u", pa_memblockq_get_length(s->memblockq));*/ + /*pa_log("get_latency: %u", pa_memblockq_get_length(s->memblockq));*/ return pa_bytes_to_usec(pa_memblockq_get_length(s->memblockq), &o->sample_spec); } @@ -697,7 +697,7 @@ static pa_usec_t source_output_get_latency_cb(pa_source_output *o) { /*** pdispatch callbacks ***/ static void protocol_error(struct connection *c) { - pa_log(__FILE__": protocol error, kicking client"); + pa_log("protocol error, kicking client"); connection_free(c); } @@ -945,19 +945,19 @@ static void command_auth(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t gid_t gid; if ((gid = pa_get_gid_of_group(c->protocol->auth_group)) == (gid_t) -1) - pa_log_warn(__FILE__": failed to get GID of group '%s'", c->protocol->auth_group); + pa_log_warn("failed to get GID of group '%s'", c->protocol->auth_group); else if (gid == creds->gid) success = 1; if (!success) { if ((r = pa_uid_in_group(creds->uid, c->protocol->auth_group)) < 0) - pa_log_warn(__FILE__": failed to check group membership."); + pa_log_warn("failed to check group membership."); else if (r > 0) success = 1; } } - pa_log_info(__FILE__": Got credentials: uid=%lu gid=%lu success=%i", + pa_log_info("Got credentials: uid=%lu gid=%lu success=%i", (unsigned long) creds->uid, (unsigned long) creds->gid, success); @@ -968,7 +968,7 @@ static void command_auth(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t success = 1; if (!success) { - pa_log_warn(__FILE__": Denied access to client with invalid authorization data."); + pa_log_warn("Denied access to client with invalid authorization data."); pa_pstream_send_error(c->pstream, tag, PA_ERR_ACCESS); return; } @@ -2199,7 +2199,7 @@ static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_c assert(p && packet && packet->data && c); if (pa_pdispatch_run(c->pdispatch, packet, creds, c) < 0) { - pa_log(__FILE__": invalid packet."); + pa_log("invalid packet."); connection_free(c); } } @@ -2210,7 +2210,7 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o assert(p && chunk && userdata); if (!(stream = pa_idxset_get_by_index(c->output_streams, channel))) { - pa_log(__FILE__": client sent block for invalid stream."); + pa_log("client sent block for invalid stream."); /* Ignoring */ return; } @@ -2227,7 +2227,7 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o if (pa_memblockq_push_align(ps->memblockq, chunk) < 0) { pa_tagstruct *t; - pa_log_warn(__FILE__": failed to push data into queue"); + pa_log_warn("failed to push data into queue"); /* Pushing this block into the queue failed, so we simulate * it by skipping ahead */ @@ -2282,7 +2282,7 @@ static void pstream_die_callback(pa_pstream *p, void *userdata) { assert(p && c); connection_free(c); -/* pa_log(__FILE__": connection died.");*/ +/* pa_log("connection died.");*/ } @@ -2317,7 +2317,7 @@ static void on_connection(PA_GCC_UNUSED pa_socket_server*s, pa_iochannel *io, vo assert(io && p); if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) { - pa_log_warn(__FILE__": Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS); + pa_log_warn("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS); pa_iochannel_free(io); return; } @@ -2327,7 +2327,7 @@ static void on_connection(PA_GCC_UNUSED pa_socket_server*s, pa_iochannel *io, vo c->authorized = !!p->public; if (!c->authorized && p->auth_ip_acl && pa_ip_acl_check(p->auth_ip_acl, pa_iochannel_get_recv_fd(io)) > 0) { - pa_log_info(__FILE__": Client authenticated by IP ACL."); + pa_log_info("Client authenticated by IP ACL."); c->authorized = 1; } @@ -2388,7 +2388,7 @@ static int load_key(pa_protocol_native*p, const char*fn) { p->auth_cookie_in_property = 0; if (!fn && pa_authkey_prop_get(p->core, PA_NATIVE_COOKIE_PROPERTY_NAME, p->auth_cookie, sizeof(p->auth_cookie)) >= 0) { - pa_log_info(__FILE__": using already loaded auth cookie."); + pa_log_info("using already loaded auth cookie."); pa_authkey_prop_ref(p->core, PA_NATIVE_COOKIE_PROPERTY_NAME); p->auth_cookie_in_property = 1; return 0; @@ -2400,7 +2400,7 @@ static int load_key(pa_protocol_native*p, const char*fn) { if (pa_authkey_load_auto(fn, p->auth_cookie, sizeof(p->auth_cookie)) < 0) return -1; - pa_log_info(__FILE__": loading cookie from disk."); + pa_log_info("loading cookie from disk."); if (pa_authkey_prop_put(p->core, PA_NATIVE_COOKIE_PROPERTY_NAME, p->auth_cookie, sizeof(p->auth_cookie)) >= 0) p->auth_cookie_in_property = 1; @@ -2417,7 +2417,7 @@ static pa_protocol_native* protocol_new_internal(pa_core *c, pa_module *m, pa_mo assert(ma); if (pa_modargs_get_value_boolean(ma, "auth-anonymous", &public) < 0) { - pa_log(__FILE__": auth-anonymous= expects a boolean argument."); + pa_log("auth-anonymous= expects a boolean argument."); return NULL; } @@ -2432,13 +2432,13 @@ static pa_protocol_native* protocol_new_internal(pa_core *c, pa_module *m, pa_mo { int a = 1; if (pa_modargs_get_value_boolean(ma, "auth-group-enabled", &a) < 0) { - pa_log(__FILE__": auth-group-enabled= expects a boolean argument."); + pa_log("auth-group-enabled= expects a boolean argument."); return NULL; } p->auth_group = a ? pa_xstrdup(pa_modargs_get_value(ma, "auth-group", c->is_system_instance ? PA_ACCESS_GROUP : NULL)) : NULL; if (p->auth_group) - pa_log_info(__FILE__": Allowing access to group '%s'.", p->auth_group); + pa_log_info("Allowing access to group '%s'.", p->auth_group); } #endif @@ -2446,7 +2446,7 @@ static pa_protocol_native* protocol_new_internal(pa_core *c, pa_module *m, pa_mo if ((acl = pa_modargs_get_value(ma, "auth-ip-acl", NULL))) { if (!(p->auth_ip_acl = pa_ip_acl_new(acl))) { - pa_log(__FILE__": Failed to parse IP ACL '%s'", acl); + pa_log("Failed to parse IP ACL '%s'", acl); goto fail; } } diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c index 924ee29e..6bfba875 100644 --- a/src/pulsecore/protocol-simple.c +++ b/src/pulsecore/protocol-simple.c @@ -134,7 +134,7 @@ static int do_read(struct connection *c) { } if ((r = pa_iochannel_read(c->io, (uint8_t*) c->playback.current_memblock->data+c->playback.memblock_index, l)) <= 0) { - pa_log_debug(__FILE__": read(): %s", r == 0 ? "EOF" : pa_cstrerror(errno)); + pa_log_debug("read(): %s", r == 0 ? "EOF" : pa_cstrerror(errno)); return -1; } @@ -168,7 +168,7 @@ static int do_write(struct connection *c) { if ((r = pa_iochannel_write(c->io, (uint8_t*) chunk.memblock->data+chunk.index, chunk.length)) < 0) { pa_memblock_unref(chunk.memblock); - pa_log(__FILE__": write(): %s", pa_cstrerror(errno)); + pa_log("write(): %s", pa_cstrerror(errno)); return -1; } @@ -315,7 +315,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) assert(s && io && p); if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) { - pa_log(__FILE__": Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS); + pa_log("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS); pa_iochannel_free(io); return; } @@ -351,7 +351,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) data.client = c->client; if (!(c->sink_input = pa_sink_input_new(p->core, &data, 0))) { - pa_log(__FILE__": Failed to create sink input."); + pa_log("Failed to create sink input."); goto fail; } @@ -389,7 +389,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata) data.client = c->client; if (!(c->source_output = pa_source_output_new(p->core, &data, 0))) { - pa_log(__FILE__": Failed to create source output."); + pa_log("Failed to create source output."); goto fail; } c->source_output->push = source_output_push_cb; @@ -437,7 +437,7 @@ pa_protocol_simple* pa_protocol_simple_new(pa_core *core, pa_socket_server *serv p->sample_spec = core->default_sample_spec; if (pa_modargs_get_sample_spec(ma, &p->sample_spec) < 0) { - pa_log(__FILE__": Failed to parse sample type specification."); + pa_log("Failed to parse sample type specification."); goto fail; } @@ -446,20 +446,20 @@ pa_protocol_simple* pa_protocol_simple_new(pa_core *core, pa_socket_server *serv enable = 0; if (pa_modargs_get_value_boolean(ma, "record", &enable) < 0) { - pa_log(__FILE__": record= expects a numeric argument."); + pa_log("record= expects a numeric argument."); goto fail; } p->mode = enable ? RECORD : 0; enable = 1; if (pa_modargs_get_value_boolean(ma, "playback", &enable) < 0) { - pa_log(__FILE__": playback= expects a numeric argument."); + pa_log("playback= expects a numeric argument."); goto fail; } p->mode |= enable ? PLAYBACK : 0; if ((p->mode & (RECORD|PLAYBACK)) == 0) { - pa_log(__FILE__": neither playback nor recording enabled for protocol."); + pa_log("neither playback nor recording enabled for protocol."); goto fail; } diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c index 421f5de9..ca8137a4 100644 --- a/src/pulsecore/pstream.c +++ b/src/pulsecore/pstream.c @@ -357,7 +357,7 @@ static void memimport_release_cb(pa_memimport *i, uint32_t block_id, void *userd if (p->dead) return; -/* pa_log(__FILE__": Releasing block %u", block_id); */ +/* pa_log("Releasing block %u", block_id); */ item = pa_xnew(struct item_info, 1); item->type = PA_PSTREAM_ITEM_SHMRELEASE; @@ -380,7 +380,7 @@ static void memexport_revoke_cb(pa_memexport *e, uint32_t block_id, void *userda if (p->dead) return; -/* pa_log(__FILE__": Revoking block %u", block_id); */ +/* pa_log("Revoking block %u", block_id); */ item = pa_xnew(struct item_info, 1); item->type = PA_PSTREAM_ITEM_SHMREVOKE; @@ -462,7 +462,7 @@ static void prepare_next_write_item(pa_pstream *p) { p->write.data = p->write.shm_info; } /* else */ -/* pa_log_warn(__FILE__": Failed to export memory block."); */ +/* pa_log_warn("Failed to export memory block."); */ } if (send_payload) { @@ -569,7 +569,7 @@ static int do_read(pa_pstream *p) { flags = ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS]); if (!p->use_shm && (flags & PA_FLAG_SHMMASK) != 0) { - pa_log_warn(__FILE__": Recieved SHM frame on a socket where SHM is disabled."); + pa_log_warn("Recieved SHM frame on a socket where SHM is disabled."); return -1; } @@ -577,7 +577,7 @@ static int do_read(pa_pstream *p) { /* This is a SHM memblock release frame with no payload */ -/* pa_log(__FILE__": Got release frame for %u", ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); */ +/* pa_log("Got release frame for %u", ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); */ assert(p->export); pa_memexport_process_release(p->export, ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); @@ -588,7 +588,7 @@ static int do_read(pa_pstream *p) { /* This is a SHM memblock revoke frame with no payload */ -/* pa_log(__FILE__": Got revoke frame for %u", ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); */ +/* pa_log("Got revoke frame for %u", ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); */ assert(p->import); pa_memimport_process_revoke(p->import, ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); @@ -599,7 +599,7 @@ static int do_read(pa_pstream *p) { length = ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]); if (length > FRAME_SIZE_MAX) { - pa_log_warn(__FILE__": Recieved invalid frame size : %lu", (unsigned long) length); + pa_log_warn("Recieved invalid frame size : %lu", (unsigned long) length); return -1; } @@ -610,7 +610,7 @@ static int do_read(pa_pstream *p) { if (channel == (uint32_t) -1) { if (flags != 0) { - pa_log_warn(__FILE__": Received packet frame with invalid flags value."); + pa_log_warn("Received packet frame with invalid flags value."); return -1; } @@ -621,14 +621,14 @@ static int do_read(pa_pstream *p) { } else { if ((flags & PA_FLAG_SEEKMASK) > PA_SEEK_RELATIVE_END) { - pa_log_warn(__FILE__": Received memblock frame with invalid seek mode."); + pa_log_warn("Received memblock frame with invalid seek mode."); return -1; } if ((flags & PA_FLAG_SHMMASK) == PA_FLAG_SHMDATA) { if (length != sizeof(p->read.shm_info)) { - pa_log_warn(__FILE__": Recieved SHM memblock frame with Invalid frame length."); + pa_log_warn("Recieved SHM memblock frame with Invalid frame length."); return -1; } @@ -643,7 +643,7 @@ static int do_read(pa_pstream *p) { p->read.data = p->read.memblock->data; } else { - pa_log_warn(__FILE__": Recieved memblock frame with invalid flags value."); + pa_log_warn("Recieved memblock frame with invalid flags value."); return -1; } } @@ -717,7 +717,7 @@ static int do_read(pa_pstream *p) { ntohl(p->read.shm_info[PA_PSTREAM_SHM_INDEX]), ntohl(p->read.shm_info[PA_PSTREAM_SHM_LENGTH])))) { - pa_log_warn(__FILE__": Failed to import memory block."); + pa_log_warn("Failed to import memory block."); return -1; } diff --git a/src/pulsecore/random.c b/src/pulsecore/random.c index 684ead71..7908e87d 100644 --- a/src/pulsecore/random.c +++ b/src/pulsecore/random.c @@ -81,7 +81,7 @@ void pa_random_seed(void) { if (random_proper(&seed, sizeof(unsigned int)) < 0) { if (!has_whined) - pa_log_warn(__FILE__": failed to get proper entropy. Falling back to seeding with current time."); + pa_log_warn("failed to get proper entropy. Falling back to seeding with current time."); has_whined = 1; seed = (unsigned int) time(NULL); @@ -100,7 +100,7 @@ void pa_random(void *ret_data, size_t length) { return; if (!has_whined) - pa_log_warn(__FILE__": failed to get proper entropy. Falling back to unsecure pseudo RNG."); + pa_log_warn("failed to get proper entropy. Falling back to unsecure pseudo RNG."); has_whined = 1; for (p = ret_data, l = length; l > 0; p++, l--) diff --git a/src/pulsecore/sample-util.c b/src/pulsecore/sample-util.c index 7f5d8a02..d902b4b5 100644 --- a/src/pulsecore/sample-util.c +++ b/src/pulsecore/sample-util.c @@ -282,7 +282,7 @@ size_t pa_mix( } default: - pa_log_error(__FILE__": ERROR: Unable to mix audio data of format %s.", pa_sample_format_to_string(spec->format)); + pa_log_error("ERROR: Unable to mix audio data of format %s.", pa_sample_format_to_string(spec->format)); abort(); } } @@ -398,7 +398,7 @@ void pa_volume_memchunk(pa_memchunk*c, const pa_sample_spec *spec, const pa_cvol } default: - pa_log_error(__FILE__": ERROR: Unable to change volume of format %s.", + pa_log_error("ERROR: Unable to change volume of format %s.", pa_sample_format_to_string(spec->format)); abort(); } diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c index ad9dc46a..bf0071d6 100644 --- a/src/pulsecore/shm.c +++ b/src/pulsecore/shm.c @@ -61,7 +61,7 @@ int pa_shm_create_rw(pa_shm *m, size_t size, int shared, mode_t mode) { #ifdef MAP_ANONYMOUS if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS, fd, 0)) == MAP_FAILED) { - pa_log(__FILE__": mmap() failed: %s", pa_cstrerror(errno)); + pa_log("mmap() failed: %s", pa_cstrerror(errno)); goto fail; } #else @@ -75,17 +75,17 @@ int pa_shm_create_rw(pa_shm *m, size_t size, int shared, mode_t mode) { segment_name(fn, sizeof(fn), m->id); if ((fd = shm_open(fn, O_RDWR|O_CREAT|O_EXCL, mode & 0444)) < 0) { - pa_log(__FILE__": shm_open() failed: %s", pa_cstrerror(errno)); + pa_log("shm_open() failed: %s", pa_cstrerror(errno)); goto fail; } if (ftruncate(fd, m->size = size) < 0) { - pa_log(__FILE__": ftruncate() failed: %s", pa_cstrerror(errno)); + pa_log("ftruncate() failed: %s", pa_cstrerror(errno)); goto fail; } if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) { - pa_log(__FILE__": mmap() failed: %s", pa_cstrerror(errno)); + pa_log("mmap() failed: %s", pa_cstrerror(errno)); goto fail; } @@ -121,7 +121,7 @@ void pa_shm_free(pa_shm *m) { #endif if (munmap(m->ptr, m->size) < 0) - pa_log(__FILE__": munmap() failed: %s", pa_cstrerror(errno)); + pa_log("munmap() failed: %s", pa_cstrerror(errno)); if (m->do_unlink) { segment_name(fn, sizeof(fn), m->id); @@ -188,24 +188,24 @@ int pa_shm_attach_ro(pa_shm *m, unsigned id) { segment_name(fn, sizeof(fn), m->id = id); if ((fd = shm_open(fn, O_RDONLY, 0)) < 0) { - pa_log(__FILE__": shm_open() failed: %s", pa_cstrerror(errno)); + pa_log("shm_open() failed: %s", pa_cstrerror(errno)); goto fail; } if (fstat(fd, &st) < 0) { - pa_log(__FILE__": fstat() failed: %s", pa_cstrerror(errno)); + pa_log("fstat() failed: %s", pa_cstrerror(errno)); goto fail; } if (st.st_size <= 0 || st.st_size > MAX_SHM_SIZE) { - pa_log(__FILE__": Invalid shared memory segment size"); + pa_log("Invalid shared memory segment size"); goto fail; } m->size = st.st_size; if ((m->ptr = mmap(NULL, m->size, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) { - pa_log(__FILE__": mmap() failed: %s", pa_cstrerror(errno)); + pa_log("mmap() failed: %s", pa_cstrerror(errno)); goto fail; } diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index b5ba9df1..d948f0a4 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -127,7 +127,7 @@ pa_sink_input* pa_sink_input_new( CHECK_VALIDITY_RETURN_NULL(data->resample_method < PA_RESAMPLER_MAX); if (pa_idxset_size(data->sink->inputs) >= PA_MAX_INPUTS_PER_SINK) { - pa_log_warn(__FILE__": Failed to create sink input: too many inputs per sink."); + pa_log_warn("Failed to create sink input: too many inputs per sink."); return NULL; } @@ -140,7 +140,7 @@ pa_sink_input* pa_sink_input_new( &data->sample_spec, &data->channel_map, &data->sink->sample_spec, &data->sink->channel_map, data->resample_method))) { - pa_log_warn(__FILE__": Unsupported resampling operation."); + pa_log_warn("Unsupported resampling operation."); return NULL; } @@ -177,7 +177,7 @@ pa_sink_input* pa_sink_input_new( r = pa_idxset_put(i->sink->inputs, i, NULL); assert(r == 0); - pa_log_info(__FILE__": created %u \"%s\" on %s with sample spec %s", + pa_log_info("created %u \"%s\" on %s with sample spec %s", i->index, i->name, i->sink->name, @@ -218,7 +218,7 @@ static void sink_input_free(pa_sink_input* i) { if (i->state != PA_SINK_INPUT_DISCONNECTED) pa_sink_input_disconnect(i); - pa_log_info(__FILE__": freed %u \"%s\"", i->index, i->name); + pa_log_info("freed %u \"%s\"", i->index, i->name); if (i->resampled_chunk.memblock) pa_memblock_unref(i->resampled_chunk.memblock); @@ -522,7 +522,7 @@ int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately) { return 0; if (pa_idxset_size(dest->inputs) >= PA_MAX_INPUTS_PER_SINK) { - pa_log_warn(__FILE__": Failed to move sink input: too many inputs per sink."); + pa_log_warn("Failed to move sink input: too many inputs per sink."); return -1; } @@ -544,7 +544,7 @@ int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately) { &i->sample_spec, &i->channel_map, &dest->sample_spec, &dest->channel_map, i->resample_method))) { - pa_log_warn(__FILE__": Unsupported resampling operation."); + pa_log_warn("Unsupported resampling operation."); return -1; } } diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index aacb89fd..05695254 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -116,12 +116,12 @@ pa_sink* pa_sink_new( assert(s->index != PA_IDXSET_INVALID && r >= 0); pa_sample_spec_snprint(st, sizeof(st), spec); - pa_log_info(__FILE__": created %u \"%s\" with sample spec \"%s\"", s->index, s->name, st); + pa_log_info("created %u \"%s\" with sample spec \"%s\"", s->index, s->name, st); n = pa_sprintf_malloc("%s.monitor", name); if (!(s->monitor_source = pa_source_new(core, driver, n, 0, spec, map))) - pa_log_warn(__FILE__": failed to create monitor source."); + pa_log_warn("failed to create monitor source."); else { char *d; s->monitor_source->monitor_of = s; @@ -176,7 +176,7 @@ static void sink_free(pa_sink *s) { if (s->state != PA_SINK_DISCONNECTED) pa_sink_disconnect(s); - pa_log_info(__FILE__": freed %u \"%s\"", s->index, s->name); + pa_log_info("freed %u \"%s\"", s->index, s->name); if (s->monitor_source) { pa_source_unref(s->monitor_source); diff --git a/src/pulsecore/socket-client.c b/src/pulsecore/socket-client.c index 8e547614..2ceaf5c3 100644 --- a/src/pulsecore/socket-client.c +++ b/src/pulsecore/socket-client.c @@ -140,17 +140,17 @@ static void do_call(pa_socket_client *c) { lerror = sizeof(error); if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void*)&error, &lerror) < 0) { - pa_log(__FILE__": getsockopt(): %s", pa_cstrerror(errno)); + pa_log("getsockopt(): %s", pa_cstrerror(errno)); goto finish; } if (lerror != sizeof(error)) { - pa_log(__FILE__": getsockopt() returned invalid size."); + pa_log("getsockopt() returned invalid size."); goto finish; } if (error != 0) { - pa_log_debug(__FILE__": connect(): %s", pa_cstrerror(errno)); + pa_log_debug("connect(): %s", pa_cstrerror(errno)); errno = error; goto finish; } @@ -192,10 +192,10 @@ static int do_connect(pa_socket_client *c, const struct sockaddr *sa, socklen_t if ((r = connect(c->fd, sa, len)) < 0) { #ifdef OS_IS_WIN32 if (WSAGetLastError() != EWOULDBLOCK) { - pa_log_debug(__FILE__": connect(): %d", WSAGetLastError()); + pa_log_debug("connect(): %d", WSAGetLastError()); #else if (errno != EINPROGRESS) { - pa_log_debug(__FILE__": connect(): %s (%d)", pa_cstrerror(errno), errno); + pa_log_debug("connect(): %s (%d)", pa_cstrerror(errno), errno); #endif return -1; } @@ -267,7 +267,7 @@ static int sockaddr_prepare(pa_socket_client *c, const struct sockaddr *sa, size } if ((c->fd = socket(sa->sa_family, SOCK_STREAM, 0)) < 0) { - pa_log(__FILE__": socket(): %s", pa_cstrerror(errno)); + pa_log("socket(): %s", pa_cstrerror(errno)); return -1; } @@ -485,7 +485,7 @@ pa_socket_client* pa_socket_client_new_string(pa_mainloop_api *m, const char*nam /* FIXME: PF_INET6 support */ if (hints.ai_family == PF_INET6) { - pa_log_error(__FILE__": IPv6 is not supported on Windows"); + pa_log_error("IPv6 is not supported on Windows"); goto finish; } diff --git a/src/pulsecore/socket-server.c b/src/pulsecore/socket-server.c index 25483592..4d69b8a4 100644 --- a/src/pulsecore/socket-server.c +++ b/src/pulsecore/socket-server.c @@ -96,7 +96,7 @@ static void callback(pa_mainloop_api *mainloop, pa_io_event *e, int fd, PA_GCC_U pa_socket_server_ref(s); if ((nfd = accept(fd, NULL, NULL)) < 0) { - pa_log(__FILE__": accept(): %s", pa_cstrerror(errno)); + pa_log("accept(): %s", pa_cstrerror(errno)); goto finish; } @@ -115,12 +115,12 @@ static void callback(pa_mainloop_api *mainloop, pa_io_event *e, int fd, PA_GCC_U request_init(&req, RQ_DAEMON, s->tcpwrap_service, RQ_FILE, nfd, NULL); fromhost(&req); if (!hosts_access(&req)) { - pa_log_warn(__FILE__": TCP connection refused by tcpwrap."); + pa_log_warn("TCP connection refused by tcpwrap."); close(nfd); goto finish; } - pa_log_info(__FILE__": TCP connection accepted by tcpwrap."); + pa_log_info("TCP connection accepted by tcpwrap."); } #endif @@ -175,7 +175,7 @@ pa_socket_server* pa_socket_server_new_unix(pa_mainloop_api *m, const char *file assert(m && filename); if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) { - pa_log(__FILE__": socket(): %s", pa_cstrerror(errno)); + pa_log("socket(): %s", pa_cstrerror(errno)); goto fail; } @@ -188,7 +188,7 @@ pa_socket_server* pa_socket_server_new_unix(pa_mainloop_api *m, const char *file pa_socket_low_delay(fd); if (bind(fd, (struct sockaddr*) &sa, SUN_LEN(&sa)) < 0) { - pa_log(__FILE__": bind(): %s", pa_cstrerror(errno)); + pa_log("bind(): %s", pa_cstrerror(errno)); goto fail; } @@ -199,7 +199,7 @@ pa_socket_server* pa_socket_server_new_unix(pa_mainloop_api *m, const char *file chmod(filename, 0777); if (listen(fd, 5) < 0) { - pa_log(__FILE__": listen(): %s", pa_cstrerror(errno)); + pa_log("listen(): %s", pa_cstrerror(errno)); goto fail; } @@ -235,7 +235,7 @@ pa_socket_server* pa_socket_server_new_ipv4(pa_mainloop_api *m, uint32_t address assert(m && port); if ((fd = socket(PF_INET, SOCK_STREAM, 0)) < 0) { - pa_log(__FILE__": socket(PF_INET): %s", pa_cstrerror(errno)); + pa_log("socket(PF_INET): %s", pa_cstrerror(errno)); goto fail; } @@ -243,7 +243,7 @@ pa_socket_server* pa_socket_server_new_ipv4(pa_mainloop_api *m, uint32_t address #ifdef SO_REUSEADDR if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) - pa_log(__FILE__": setsockopt(): %s", pa_cstrerror(errno)); + pa_log("setsockopt(): %s", pa_cstrerror(errno)); #endif pa_socket_tcp_low_delay(fd); @@ -254,12 +254,12 @@ pa_socket_server* pa_socket_server_new_ipv4(pa_mainloop_api *m, uint32_t address sa.sin_addr.s_addr = htonl(address); if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) { - pa_log(__FILE__": bind(): %s", pa_cstrerror(errno)); + pa_log("bind(): %s", pa_cstrerror(errno)); goto fail; } if (listen(fd, 5) < 0) { - pa_log(__FILE__": listen(): %s", pa_cstrerror(errno)); + pa_log("listen(): %s", pa_cstrerror(errno)); goto fail; } @@ -286,7 +286,7 @@ pa_socket_server* pa_socket_server_new_ipv6(pa_mainloop_api *m, const uint8_t ad assert(m && port); if ((fd = socket(PF_INET6, SOCK_STREAM, 0)) < 0) { - pa_log(__FILE__": socket(PF_INET6): %s", pa_cstrerror(errno)); + pa_log("socket(PF_INET6): %s", pa_cstrerror(errno)); goto fail; } @@ -294,12 +294,12 @@ pa_socket_server* pa_socket_server_new_ipv6(pa_mainloop_api *m, const uint8_t ad #ifdef IPV6_V6ONLY if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0) - pa_log(__FILE__": setsockopt(IPPROTO_IPV6, IPV6_V6ONLY): %s", pa_cstrerror(errno)); + pa_log("setsockopt(IPPROTO_IPV6, IPV6_V6ONLY): %s", pa_cstrerror(errno)); #endif #ifdef SO_REUSEADDR if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) - pa_log(__FILE__": setsockopt(SOL_SOCKET, SO_REUSEADDR, 1): %s", pa_cstrerror(errno)); + pa_log("setsockopt(SOL_SOCKET, SO_REUSEADDR, 1): %s", pa_cstrerror(errno)); #endif pa_socket_tcp_low_delay(fd); @@ -310,12 +310,12 @@ pa_socket_server* pa_socket_server_new_ipv6(pa_mainloop_api *m, const uint8_t ad memcpy(sa.sin6_addr.s6_addr, address, 16); if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) { - pa_log(__FILE__": bind(): %s", pa_cstrerror(errno)); + pa_log("bind(): %s", pa_cstrerror(errno)); goto fail; } if (listen(fd, 5) < 0) { - pa_log(__FILE__": listen(): %s", pa_cstrerror(errno)); + pa_log("listen(): %s", pa_cstrerror(errno)); goto fail; } @@ -426,7 +426,7 @@ char *pa_socket_server_get_address(pa_socket_server *s, char *c, size_t l) { socklen_t sa_len = sizeof(sa); if (getsockname(s->fd, (struct sockaddr*) &sa, &sa_len) < 0) { - pa_log(__FILE__": getsockname(): %s", pa_cstrerror(errno)); + pa_log("getsockname(): %s", pa_cstrerror(errno)); return NULL; } @@ -447,7 +447,7 @@ char *pa_socket_server_get_address(pa_socket_server *s, char *c, size_t l) { char ip[INET6_ADDRSTRLEN]; if (!inet_ntop(AF_INET6, &sa.sin6_addr, ip, sizeof(ip))) { - pa_log(__FILE__": inet_ntop(): %s", pa_cstrerror(errno)); + pa_log("inet_ntop(): %s", pa_cstrerror(errno)); return NULL; } @@ -462,7 +462,7 @@ char *pa_socket_server_get_address(pa_socket_server *s, char *c, size_t l) { socklen_t sa_len = sizeof(sa); if (getsockname(s->fd, (struct sockaddr*) &sa, &sa_len) < 0) { - pa_log(__FILE__": getsockname(): %s", pa_cstrerror(errno)); + pa_log("getsockname(): %s", pa_cstrerror(errno)); return NULL; } @@ -482,7 +482,7 @@ char *pa_socket_server_get_address(pa_socket_server *s, char *c, size_t l) { char ip[INET_ADDRSTRLEN]; if (!inet_ntop(AF_INET, &sa.sin_addr, ip, sizeof(ip))) { - pa_log(__FILE__": inet_ntop(): %s", pa_cstrerror(errno)); + pa_log("inet_ntop(): %s", pa_cstrerror(errno)); return NULL; } diff --git a/src/pulsecore/socket-util.c b/src/pulsecore/socket-util.c index 8705560d..856c28e8 100644 --- a/src/pulsecore/socket-util.c +++ b/src/pulsecore/socket-util.c @@ -191,7 +191,7 @@ int pa_socket_set_rcvbuf(int fd, size_t l) { assert(fd >= 0); /* if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void*)&l, sizeof(l)) < 0) { */ -/* pa_log(__FILE__": SO_RCVBUF: %s", strerror(errno)); */ +/* pa_log("SO_RCVBUF: %s", strerror(errno)); */ /* return -1; */ /* } */ @@ -202,7 +202,7 @@ int pa_socket_set_sndbuf(int fd, size_t l) { assert(fd >= 0); /* if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (void*)&l, sizeof(l)) < 0) { */ -/* pa_log(__FILE__": SO_SNDBUF: %s", strerror(errno)); */ +/* pa_log("SO_SNDBUF: %s", strerror(errno)); */ /* return -1; */ /* } */ @@ -216,7 +216,7 @@ int pa_unix_socket_is_stale(const char *fn) { int fd = -1, ret = -1; if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) { - pa_log(__FILE__": socket(): %s", pa_cstrerror(errno)); + pa_log("socket(): %s", pa_cstrerror(errno)); goto finish; } diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c index 6782f50e..e6f24a79 100644 --- a/src/pulsecore/sound-file-stream.c +++ b/src/pulsecore/sound-file-stream.c @@ -142,7 +142,7 @@ int pa_play_file( memset(&sfinfo, 0, sizeof(sfinfo)); if (!(u->sndfile = sf_open(fname, SFM_READ, &sfinfo))) { - pa_log(__FILE__": Failed to open file %s", fname); + pa_log("Failed to open file %s", fname); goto fail; } @@ -175,7 +175,7 @@ int pa_play_file( ss.channels = sfinfo.channels; if (!pa_sample_spec_valid(&ss)) { - pa_log(__FILE__": Unsupported sample format in file %s", fname); + pa_log("Unsupported sample format in file %s", fname); goto fail; } diff --git a/src/pulsecore/sound-file.c b/src/pulsecore/sound-file.c index 256cce43..1bf650e2 100644 --- a/src/pulsecore/sound-file.c +++ b/src/pulsecore/sound-file.c @@ -48,7 +48,7 @@ int pa_sound_file_load(pa_mempool *pool, const char *fname, pa_sample_spec *ss, memset(&sfinfo, 0, sizeof(sfinfo)); if (!(sf = sf_open(fname, SFM_READ, &sfinfo))) { - pa_log(__FILE__": Failed to open file %s", fname); + pa_log("Failed to open file %s", fname); goto finish; } @@ -80,7 +80,7 @@ int pa_sound_file_load(pa_mempool *pool, const char *fname, pa_sample_spec *ss, ss->channels = sfinfo.channels; if (!pa_sample_spec_valid(ss)) { - pa_log(__FILE__": Unsupported sample format in file %s", fname); + pa_log("Unsupported sample format in file %s", fname); goto finish; } @@ -88,7 +88,7 @@ int pa_sound_file_load(pa_mempool *pool, const char *fname, pa_sample_spec *ss, pa_channel_map_init_auto(map, ss->channels, PA_CHANNEL_MAP_DEFAULT); if ((l = pa_frame_size(ss)*sfinfo.frames) > PA_SCACHE_ENTRY_SIZE_MAX) { - pa_log(__FILE__": File too large"); + pa_log("File too large"); goto finish; } @@ -99,7 +99,7 @@ int pa_sound_file_load(pa_mempool *pool, const char *fname, pa_sample_spec *ss, if ((readf_function && readf_function(sf, chunk->memblock->data, sfinfo.frames) != sfinfo.frames) || (!readf_function && sf_read_raw(sf, chunk->memblock->data, l) != l)) { - pa_log(__FILE__": Premature file end"); + pa_log("Premature file end"); goto finish; } @@ -123,7 +123,7 @@ int pa_sound_file_too_big_to_cache(const char *fname) { pa_sample_spec ss; if (!(sf = sf_open(fname, SFM_READ, &sfinfo))) { - pa_log(__FILE__": Failed to open file %s", fname); + pa_log("Failed to open file %s", fname); return 0; } @@ -155,7 +155,7 @@ int pa_sound_file_too_big_to_cache(const char *fname) { ss.channels = sfinfo.channels; if ((pa_frame_size(&ss) * sfinfo.frames) > PA_SCACHE_ENTRY_SIZE_MAX) { - pa_log(__FILE__": File too large %s", fname); + pa_log("File too large %s", fname); return 1; } diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c index f9d66f6d..a2fc8519 100644 --- a/src/pulsecore/source-output.c +++ b/src/pulsecore/source-output.c @@ -108,7 +108,7 @@ pa_source_output* pa_source_output_new( CHECK_VALIDITY_RETURN_NULL(data->resample_method < PA_RESAMPLER_MAX); if (pa_idxset_size(data->source->outputs) >= PA_MAX_OUTPUTS_PER_SOURCE) { - pa_log(__FILE__": Failed to create source output: too many outputs per source."); + pa_log("Failed to create source output: too many outputs per source."); return NULL; } @@ -119,7 +119,7 @@ pa_source_output* pa_source_output_new( &data->source->sample_spec, &data->source->channel_map, &data->sample_spec, &data->channel_map, data->resample_method))) { - pa_log_warn(__FILE__": Unsupported resampling operation."); + pa_log_warn("Unsupported resampling operation."); return NULL; } @@ -148,7 +148,7 @@ pa_source_output* pa_source_output_new( r = pa_idxset_put(o->source->outputs, o, NULL); assert(r == 0); - pa_log_info(__FILE__": created %u \"%s\" on %s with sample spec %s", + pa_log_info("created %u \"%s\" on %s with sample spec %s", o->index, o->name, o->source->name, @@ -187,7 +187,7 @@ static void source_output_free(pa_source_output* o) { if (o->state != PA_SOURCE_OUTPUT_DISCONNECTED) pa_source_output_disconnect(o); - pa_log_info(__FILE__": freed %u \"%s\"", o->index, o->name); + pa_log_info("freed %u \"%s\"", o->index, o->name); if (o->resampler) pa_resampler_free(o->resampler); @@ -313,7 +313,7 @@ int pa_source_output_move_to(pa_source_output *o, pa_source *dest) { return 0; if (pa_idxset_size(dest->outputs) >= PA_MAX_OUTPUTS_PER_SOURCE) { - pa_log_warn(__FILE__": Failed to move source output: too many outputs per source."); + pa_log_warn("Failed to move source output: too many outputs per source."); return -1; } @@ -334,7 +334,7 @@ int pa_source_output_move_to(pa_source_output *o, pa_source *dest) { &dest->sample_spec, &dest->channel_map, &o->sample_spec, &o->channel_map, o->resample_method))) { - pa_log_warn(__FILE__": Unsupported resampling operation."); + pa_log_warn("Unsupported resampling operation."); return -1; } } diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c index cb5b1030..c48d6aaa 100644 --- a/src/pulsecore/source.c +++ b/src/pulsecore/source.c @@ -112,7 +112,7 @@ pa_source* pa_source_new( assert(s->index != PA_IDXSET_INVALID && r >= 0); pa_sample_spec_snprint(st, sizeof(st), spec); - pa_log_info(__FILE__": created %u \"%s\" with sample spec \"%s\"", s->index, s->name, st); + pa_log_info("created %u \"%s\" with sample spec \"%s\"", s->index, s->name, st); pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_SOURCE | PA_SUBSCRIPTION_EVENT_NEW, s->index); @@ -155,7 +155,7 @@ static void source_free(pa_source *s) { if (s->state != PA_SOURCE_DISCONNECTED) pa_source_disconnect(s); - pa_log_info(__FILE__": freed %u \"%s\"", s->index, s->name); + pa_log_info("freed %u \"%s\"", s->index, s->name); pa_idxset_free(s->outputs, NULL, NULL); diff --git a/src/pulsecore/x11wrap.c b/src/pulsecore/x11wrap.c index 2ba0a87f..cc993e78 100644 --- a/src/pulsecore/x11wrap.c +++ b/src/pulsecore/x11wrap.c @@ -145,7 +145,7 @@ static pa_x11_wrapper* x11_wrapper_new(pa_core *c, const char *name, const char int r; if (!(d = XOpenDisplay(name))) { - pa_log(__FILE__": XOpenDisplay() failed"); + pa_log("XOpenDisplay() failed"); return NULL; } diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c index fe8038e0..b9912701 100644 --- a/src/utils/pacmd.c +++ b/src/utils/pacmd.c @@ -49,12 +49,12 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { fd_set ifds, ofds; if (pa_pid_file_check_running(&pid) < 0) { - pa_log(__FILE__": no PulseAudio daemon running"); + pa_log("no PulseAudio daemon running"); goto fail; } if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) { - pa_log(__FILE__": socket(PF_UNIX, SOCK_STREAM, 0): %s", strerror(errno)); + pa_log("socket(PF_UNIX, SOCK_STREAM, 0): %s", strerror(errno)); goto fail; } @@ -66,7 +66,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { int r; if ((r = connect(fd, (struct sockaddr*) &sa, sizeof(sa))) < 0 && (errno != ECONNREFUSED && errno != ENOENT)) { - pa_log(__FILE__": connect(): %s", strerror(errno)); + pa_log("connect(): %s", strerror(errno)); goto fail; } @@ -74,7 +74,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { break; if (pa_pid_file_kill(SIGUSR2, NULL) < 0) { - pa_log(__FILE__": failed to kill PulseAudio daemon."); + pa_log("failed to kill PulseAudio daemon."); goto fail; } @@ -82,7 +82,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { } if (i >= 5) { - pa_log(__FILE__": daemon not responding."); + pa_log("daemon not responding."); goto fail; } @@ -97,7 +97,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { for (;;) { if (select(FD_SETSIZE, &ifds, &ofds, NULL, NULL) < 0) { - pa_log(__FILE__": select(): %s", strerror(errno)); + pa_log("select(): %s", strerror(errno)); goto fail; } @@ -109,7 +109,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { if (r == 0) break; - pa_log(__FILE__": read(): %s", strerror(errno)); + pa_log("read(): %s", strerror(errno)); goto fail; } @@ -125,7 +125,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { if (r == 0) break; - pa_log(__FILE__": read(): %s", strerror(errno)); + pa_log("read(): %s", strerror(errno)); goto fail; } @@ -138,7 +138,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { assert(obuf_length); if ((r = write(1, obuf + obuf_index, obuf_length)) < 0) { - pa_log(__FILE__": write(): %s", strerror(errno)); + pa_log("write(): %s", strerror(errno)); goto fail; } @@ -152,7 +152,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { assert(ibuf_length); if ((r = write(fd, ibuf + ibuf_index, ibuf_length)) < 0) { - pa_log(__FILE__": write(): %s", strerror(errno)); + pa_log("write(): %s", strerror(errno)); goto fail; } diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index 2a0d21d6..6a3c6dbc 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -92,7 +92,7 @@ int main(int argc, char *argv[]) { } if (!(d = XOpenDisplay(dname))) { - pa_log(__FILE__": XOpenDisplay() failed"); + pa_log("XOpenDisplay() failed"); goto finish; } -- cgit