summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/alsa-util.c22
-rw-r--r--src/modules/dbus-util.c2
-rw-r--r--src/modules/gconf/module-gconf.c14
-rw-r--r--src/modules/module-alsa-sink.c38
-rw-r--r--src/modules/module-alsa-source.c38
-rw-r--r--src/modules/module-cli.c8
-rw-r--r--src/modules/module-combine.c32
-rw-r--r--src/modules/module-detect.c14
-rw-r--r--src/modules/module-esound-compat-spawnfd.c4
-rw-r--r--src/modules/module-esound-compat-spawnpid.c4
-rw-r--r--src/modules/module-esound-sink.c24
-rw-r--r--src/modules/module-hal-detect.c28
-rw-r--r--src/modules/module-jack-sink.c28
-rw-r--r--src/modules/module-jack-source.c28
-rw-r--r--src/modules/module-lirc.c20
-rw-r--r--src/modules/module-match.c10
-rw-r--r--src/modules/module-mmkbd-evdev.c28
-rw-r--r--src/modules/module-native-protocol-fd.c4
-rw-r--r--src/modules/module-null-sink.c6
-rw-r--r--src/modules/module-oss-mmap.c52
-rw-r--r--src/modules/module-oss.c34
-rw-r--r--src/modules/module-pipe-sink.c14
-rw-r--r--src/modules/module-pipe-source.c14
-rw-r--r--src/modules/module-protocol-stub.c10
-rw-r--r--src/modules/module-rescue-streams.c18
-rw-r--r--src/modules/module-sine.c6
-rw-r--r--src/modules/module-solaris.c36
-rw-r--r--src/modules/module-tunnel.c58
-rw-r--r--src/modules/module-volume-restore.c20
-rw-r--r--src/modules/module-waveout.c24
-rw-r--r--src/modules/module-x11-bell.c10
-rw-r--r--src/modules/module-x11-publish.c8
-rw-r--r--src/modules/module-zeroconf-publish.c22
-rw-r--r--src/modules/oss-util.c32
-rw-r--r--src/modules/rtp/module-rtp-recv.c24
-rw-r--r--src/modules/rtp/module-rtp-send.c36
-rw-r--r--src/modules/rtp/rtp.c18
-rw-r--r--src/modules/rtp/sap.c16
-rw-r--r--src/modules/rtp/sdp.c16
39 files changed, 410 insertions, 410 deletions
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(&regex, 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;
}