summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-02-23 02:27:19 +0000
committerLennart Poettering <lennart@poettering.net>2006-02-23 02:27:19 +0000
commit4a64b0d1167e980d81b798d813f35209895f0674 (patch)
tree52688c3035eadaea2970cb3d07c64b0676c154b8 /src/modules
parentcb59817b4a2e1f640bd9279d0c7863e7a09c1fa6 (diff)
change pa_log() and friends to not require a trailing \n on all logged strings
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@574 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/alsa-util.c2
-rw-r--r--src/modules/howl-wrap.c5
-rw-r--r--src/modules/module-alsa-sink.c22
-rw-r--r--src/modules/module-alsa-source.c22
-rw-r--r--src/modules/module-cli.c6
-rw-r--r--src/modules/module-combine.c26
-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-lirc.c20
-rw-r--r--src/modules/module-match.c12
-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.c44
-rw-r--r--src/modules/module-oss.c30
-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.c14
-rw-r--r--src/modules/module-sine.c6
-rw-r--r--src/modules/module-solaris.c30
-rw-r--r--src/modules/module-tunnel.c48
-rw-r--r--src/modules/module-waveout.c28
-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.c14
-rw-r--r--src/modules/oss-util.c22
28 files changed, 240 insertions, 241 deletions
diff --git a/src/modules/alsa-util.c b/src/modules/alsa-util.c
index 68e9f975..1b254f51 100644
--- a/src/modules/alsa-util.c
+++ b/src/modules/alsa-util.c
@@ -63,7 +63,7 @@ int pa_alsa_set_hw_params(snd_pcm_t *pcm_handle, const pa_sample_spec *ss, uint3
goto finish;
if (ss->rate != r)
- pa_log_info(__FILE__": device doesn't support %u Hz, changed to %u Hz.\n", ss->rate, r);
+ pa_log_info(__FILE__": device doesn't support %u Hz, changed to %u Hz.", ss->rate, r);
if (snd_pcm_prepare(pcm_handle) < 0)
goto finish;
diff --git a/src/modules/howl-wrap.c b/src/modules/howl-wrap.c
index b3fe8166..f4605fb2 100644
--- a/src/modules/howl-wrap.c
+++ b/src/modules/howl-wrap.c
@@ -35,7 +35,6 @@ struct pa_howl_wrapper {
pa_io_event *io_event;
sw_discovery discovery;
-
};
static void howl_io_event(pa_mainloop_api*m, pa_io_event *e, int fd, pa_io_event_flags_t f, void *userdata) {
@@ -51,7 +50,7 @@ static void howl_io_event(pa_mainloop_api*m, pa_io_event *e, int fd, pa_io_event
return;
fail:
- pa_log(__FILE__": howl connection died.\n");
+ pa_log_error(__FILE__": howl connection died.");
w->core->mainloop->io_free(w->io_event);
w->io_event = NULL;
}
@@ -62,7 +61,7 @@ static pa_howl_wrapper* howl_wrapper_new(pa_core *c) {
assert(c);
if (sw_discovery_init(&session) != SW_OKAY) {
- pa_log("sw_discovery_init() failed.\n");
+ pa_log_error(__FILE__": sw_discovery_init() failed.");
return NULL;
}
diff --git a/src/modules/module-alsa-sink.c b/src/modules/module-alsa-sink.c
index 6ea1e137..e37367c8 100644
--- a/src/modules/module-alsa-sink.c
+++ b/src/modules/module-alsa-sink.c
@@ -86,10 +86,10 @@ static void update_usage(struct userdata *u) {
static void xrun_recovery(struct userdata *u) {
assert(u);
- pa_log(__FILE__": *** ALSA-XRUN (playback) ***\n");
+ pa_log(__FILE__": *** ALSA-XRUN (playback) ***");
if (snd_pcm_prepare(u->pcm_handle) < 0)
- pa_log(__FILE__": snd_pcm_prepare() failed\n");
+ pa_log(__FILE__": snd_pcm_prepare() failed");
}
static void do_write(struct userdata *u) {
@@ -121,7 +121,7 @@ static void do_write(struct userdata *u) {
continue;
}
- pa_log(__FILE__": snd_pcm_writei() failed\n");
+ pa_log(__FILE__": snd_pcm_writei() failed");
return;
}
@@ -158,7 +158,7 @@ static pa_usec_t sink_get_latency_cb(pa_sink *s) {
assert(s && u && u->sink);
if (snd_pcm_delay(u->pcm_handle, &frames) < 0) {
- pa_log(__FILE__": failed to get delay\n");
+ pa_log(__FILE__": failed to get delay");
s->get_latency = NULL;
return 0;
}
@@ -186,13 +186,13 @@ int pa__init(pa_core *c, pa_module*m) {
int err;
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
- pa_log(__FILE__": failed to parse module arguments\n");
+ pa_log(__FILE__": failed to parse module arguments");
goto fail;
}
ss = c->default_sample_spec;
if (pa_modargs_get_sample_spec(ma, &ss) < 0) {
- pa_log(__FILE__": failed to parse sample specification\n");
+ pa_log(__FILE__": failed to parse sample specification");
goto fail;
}
frame_size = pa_frame_size(&ss);
@@ -200,7 +200,7 @@ int pa__init(pa_core *c, pa_module*m) {
periods = 8;
fragsize = 1024;
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\n");
+ pa_log(__FILE__": failed to parse buffer metrics");
goto fail;
}
period_size = fragsize;
@@ -211,12 +211,12 @@ 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\n", dev, snd_strerror(err));
+ pa_log(__FILE__": Error opening PCM device %s: %s", dev, 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\n", snd_strerror(err));
+ pa_log(__FILE__": Failed to set hardware parameters: %s", snd_strerror(err));
goto fail;
}
@@ -229,14 +229,14 @@ int pa__init(pa_core *c, pa_module*m) {
u->sink->description = pa_sprintf_malloc("Advanced Linux Sound Architecture PCM on '%s'", dev);
if (pa_create_io_events(u->pcm_handle, c->mainloop, &u->io_events, &u->n_io_events, io_callback, u) < 0) {
- pa_log(__FILE__": failed to obtain file descriptors\n");
+ pa_log(__FILE__": failed to obtain file descriptors");
goto fail;
}
u->frame_size = frame_size;
u->fragment_size = period_size;
- pa_log_info(__FILE__": using %u fragments of size %u bytes.\n", periods, u->fragment_size);
+ pa_log_info(__FILE__": using %u fragments of size %u bytes.", periods, u->fragment_size);
u->silence.memblock = pa_memblock_new(u->silence.length = u->fragment_size, c->memblock_stat);
assert(u->silence.memblock);
diff --git a/src/modules/module-alsa-source.c b/src/modules/module-alsa-source.c
index 4f281aa7..bf031350 100644
--- a/src/modules/module-alsa-source.c
+++ b/src/modules/module-alsa-source.c
@@ -85,10 +85,10 @@ static void update_usage(struct userdata *u) {
static void xrun_recovery(struct userdata *u) {
assert(u);
- pa_log(__FILE__": *** ALSA-XRUN (capture) ***\n");
+ pa_log(__FILE__": *** ALSA-XRUN (capture) ***");
if (snd_pcm_prepare(u->pcm_handle) < 0)
- pa_log(__FILE__": snd_pcm_prepare() failed\n");
+ pa_log(__FILE__": snd_pcm_prepare() failed");
}
static void do_read(struct userdata *u) {
@@ -117,7 +117,7 @@ static void do_read(struct userdata *u) {
continue;
}
- pa_log(__FILE__": snd_pcm_readi() failed: %s\n", strerror(-frames));
+ pa_log(__FILE__": snd_pcm_readi() failed: %s", strerror(-frames));
return;
}
@@ -157,7 +157,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\n");
+ pa_log(__FILE__": failed to get delay");
s->get_latency = NULL;
return 0;
}
@@ -177,13 +177,13 @@ int pa__init(pa_core *c, pa_module*m) {
int err;
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
- pa_log(__FILE__": failed to parse module arguments\n");
+ pa_log(__FILE__": failed to parse module arguments");
goto fail;
}
ss = c->default_sample_spec;
if (pa_modargs_get_sample_spec(ma, &ss) < 0) {
- pa_log(__FILE__": failed to parse sample specification\n");
+ pa_log(__FILE__": failed to parse sample specification");
goto fail;
}
frame_size = pa_frame_size(&ss);
@@ -191,7 +191,7 @@ int pa__init(pa_core *c, pa_module*m) {
periods = 12;
fragsize = 1024;
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\n");
+ pa_log(__FILE__": failed to parse buffer metrics");
goto fail;
}
period_size = fragsize;
@@ -202,12 +202,12 @@ 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\n", dev, snd_strerror(err));
+ pa_log(__FILE__": Error opening PCM device %s: %s", dev, 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\n", snd_strerror(err));
+ pa_log(__FILE__": Failed to set hardware parameters: %s", snd_strerror(err));
goto fail;
}
@@ -220,14 +220,14 @@ int pa__init(pa_core *c, pa_module*m) {
u->source->description = pa_sprintf_malloc("Advanced Linux Sound Architecture PCM on '%s'", dev);
if (pa_create_io_events(u->pcm_handle, c->mainloop, &u->io_events, &u->n_io_events, io_callback, u) < 0) {
- pa_log(__FILE__": failed to obtain file descriptors\n");
+ pa_log(__FILE__": failed to obtain file descriptors");
goto fail;
}
u->frame_size = frame_size;
u->fragment_size = period_size;
- pa_log(__FILE__": using %u fragments of size %u bytes.\n", periods, u->fragment_size);
+ pa_log(__FILE__": using %u fragments of size %u bytes.", periods, 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 c782ff8d..41e33c7f 100644
--- a/src/modules/module-cli.c
+++ b/src/modules/module-cli.c
@@ -52,17 +52,17 @@ int pa__init(pa_core *c, pa_module*m) {
assert(c && m);
if (c->running_as_daemon) {
- pa_log_info(__FILE__": Running as daemon so won't load this module.\n");
+ pa_log_info(__FILE__": Running as daemon so won't load this module.");
return 0;
}
if (m->argument) {
- pa_log(__FILE__": module doesn't accept arguments.\n");
+ pa_log(__FILE__": module doesn't accept arguments.");
return -1;
}
if (pa_stdio_acquire() < 0) {
- pa_log(__FILE__": STDIN/STDUSE already in use.\n");
+ pa_log(__FILE__": STDIN/STDUSE already in use.");
return -1;
}
diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index 750eca67..28e85427 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -112,7 +112,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.\n", u->sink->name, (float) target_latency);
+ pa_log_info(__FILE__": [%s] target latency is %0.0f usec.", u->sink->name, (float) target_latency);
base_rate = u->sink->sample_spec.rate;
@@ -125,9 +125,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).\n", o->sink_input->name, base_rate, r);
+ pa_log_warn(__FILE__": [%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.\n", o->sink_input->name, r, (double) r / base_rate, (float) o->total_latency);
+ 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_sink_input_set_rate(o->sink_input, r);
}
}
@@ -297,13 +297,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\n");
+ pa_log(__FILE__": 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'\n", rm);
+ pa_log(__FILE__": invalid resample method '%s'", rm);
goto fail;
}
}
@@ -320,22 +320,22 @@ 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\n");
+ pa_log(__FILE__": 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\n");
+ pa_log(__FILE__": 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'\n", master_name);
+ pa_log(__FILE__": invalid master sink '%s'", master_name);
goto fail;
}
if (!(u->sink = pa_sink_new(c, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &master_sink->sample_spec, &master_sink->channel_map))) {
- pa_log(__FILE__": failed to create sink\n");
+ pa_log(__FILE__": failed to create sink");
goto fail;
}
@@ -345,7 +345,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'.\n", u->sink->name);
+ pa_log(__FILE__": failed to create master sink input on sink '%s'.", u->sink->name);
goto fail;
}
@@ -354,20 +354,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", n);
+ pa_log(__FILE__": 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'.\n", slave_sink->name);
+ pa_log(__FILE__": 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.\n");
+ pa_log_warn(__FILE__": 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 18e22de6..b24d838b 100644
--- a/src/modules/module-detect.c
+++ b/src/modules/module-detect.c
@@ -66,7 +66,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\n", strerror(errno));
+ pa_log_error(__FILE__": open(\"/proc/asound/devices\") failed: %s", strerror(errno));
return -1;
}
@@ -129,7 +129,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\n", strerror(errno));
+ pa_log_error(__FILE__": failed to open OSS sndstat device: %s", strerror(errno));
return -1;
}
@@ -185,7 +185,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\n", dev, strerror(errno));
+ pa_log_error(__FILE__": failed to open device %s: %s", dev, strerror(errno));
return -1;
}
@@ -227,12 +227,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\n");
+ pa_log(__FILE__": 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.\n");
+ pa_log(__FILE__": just_one= expects a boolean argument.");
goto fail;
}
@@ -249,11 +249,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.\n");
+ pa_log_warn(__FILE__": failed to detect any sound hardware.");
goto fail;
}
- pa_log_info(__FILE__": loaded %i modules.\n", n);
+ pa_log_info(__FILE__": 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 5c656be9..9b72448f 100644
--- a/src/modules/module-esound-compat-spawnfd.c
+++ b/src/modules/module-esound-compat-spawnfd.c
@@ -54,12 +54,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\n");
+ pa_log(__FILE__": Failed to parse module arguments");
goto finish;
}
if (pa_loop_write(fd, &x, sizeof(x)) != sizeof(x))
- pa_log(__FILE__": WARNING: write(%u, 1, 1) failed: %s\n", fd, strerror(errno));
+ pa_log(__FILE__": WARNING: write(%u, 1, 1) failed: %s", fd, strerror(errno));
close(fd);
diff --git a/src/modules/module-esound-compat-spawnpid.c b/src/modules/module-esound-compat-spawnpid.c
index 5daa1297..f8c07d31 100644
--- a/src/modules/module-esound-compat-spawnpid.c
+++ b/src/modules/module-esound-compat-spawnpid.c
@@ -54,12 +54,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\n");
+ pa_log(__FILE__": Failed to parse module arguments");
goto finish;
}
if (kill(pid, SIGUSR1) < 0)
- pa_log(__FILE__": WARNING: kill(%u) failed: %s\n", pid, strerror(errno));
+ pa_log(__FILE__": WARNING: kill(%u) failed: %s", pid, strerror(errno));
pa_module_unload_request(m);
diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c
index 4f724811..1cc75502 100644
--- a/src/modules/module-esound-sink.c
+++ b/src/modules/module-esound-sink.c
@@ -127,7 +127,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\n", strerror(errno));
+ pa_log(__FILE__": write() failed: %s", strerror(errno));
return -1;
}
@@ -149,7 +149,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\n", strerror(errno));
+ pa_log(__FILE__": write() failed: %s", strerror(errno));
return -1;
}
@@ -174,7 +174,7 @@ static int handle_response(struct userdata *u) {
/* Process auth data */
if (!*(int32_t*) u->read_data) {
- pa_log(__FILE__": Authentication failed: %s\n", strerror(errno));
+ pa_log(__FILE__": Authentication failed: %s", strerror(errno));
return -1;
}
@@ -199,7 +199,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\n");
+ pa_log(__FILE__": WARNING! Invalid latency information received from server");
u->latency = 0;
}
@@ -244,7 +244,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\n", r < 0 ? strerror(errno) : "EOF");
+ pa_log(__FILE__": read() failed: %s", r < 0 ? strerror(errno) : "EOF");
cancel(u);
return -1;
}
@@ -304,7 +304,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\n", strerror(errno));
+ pa_log(__FILE__": connection failed: %s", strerror(errno));
cancel(u);
return;
}
@@ -321,19 +321,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\n");
+ pa_log(__FILE__": 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\n");
+ pa_log(__FILE__": 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\n");
+ pa_log(__FILE__": esound sample type support is limited to mono/stereo and U8 or S16NE sample data");
goto fail;
}
@@ -354,12 +354,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.\n");
+ pa_log(__FILE__": 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.\n");
+ pa_log(__FILE__": failed to connect to server.");
goto fail;
}
pa_socket_client_set_callback(u->client, on_connection, u);
@@ -367,7 +367,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\n");
+ pa_log(__FILE__": 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-lirc.c b/src/modules/module-lirc.c
index ea8a2bd2..3bb0dc74 100644
--- a/src/modules/module-lirc.c
+++ b/src/modules/module-lirc.c
@@ -69,7 +69,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.\n");
+ pa_log(__FILE__": lost connection to LIRC daemon.");
goto fail;
}
@@ -77,19 +77,19 @@ 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.\n");
+ pa_log(__FILE__": lirc_nextcode() failed.");
goto fail;
}
c = pa_xstrdup(code);
c[strcspn(c, "\n\r")] = 0;
- pa_log_debug(__FILE__": raw IR code '%s'\n", c);
+ pa_log_debug(__FILE__": raw IR code '%s'", c);
pa_xfree(c);
while (lirc_code2char(u->config, code, &name) == 0 && name) {
enum { INVALID, UP, DOWN, MUTE, RESET, MUTE_TOGGLE } volchange = INVALID;
- pa_log_info(__FILE__": translated IR code '%s'\n", name);
+ pa_log_info(__FILE__": translated IR code '%s'", name);
if (strcasecmp(name, "volume-up") == 0)
volchange = UP;
@@ -103,12 +103,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'\n", name);
+ pa_log_warn(__FILE__": 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'\n", u->sink_name);
+ pa_log(__FILE__": failed to get sink '%s'", u->sink_name);
else {
pa_volume_t v = pa_cvolume_avg(pa_sink_get_volume(s, PA_MIXER_HARDWARE));
pa_cvolume cv;
@@ -173,12 +173,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.\n");
+ pa_log(__FILE__": 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\n");
+ pa_log(__FILE__": Failed to parse module arguments");
goto fail;
}
@@ -191,12 +191,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", "polypaudio"), 1)) < 0) {
- pa_log(__FILE__": lirc_init() failed.\n");
+ pa_log(__FILE__": 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.\n");
+ pa_log(__FILE__": lirc_readconfig() failed.");
goto fail;
}
diff --git a/src/modules/module-match.c b/src/modules/module-match.c
index 1fb7233c..59817517 100644
--- a/src/modules/module-match.c
+++ b/src/modules/module-match.c
@@ -84,7 +84,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);
if (!f) {
- pa_log(__FILE__": failed to open file '%s': %s\n", fn, strerror(errno));
+ pa_log(__FILE__": failed to open file '%s': %s", fn, strerror(errno));
goto finish;
}
@@ -111,13 +111,13 @@ static int load_rules(struct userdata *u, const char *filename) {
if (!*v) {
- pa_log(__FILE__ ": [%s:%u] failed to parse line - too few words\n", filename, n);
+ pa_log(__FILE__ ": [%s:%u] failed to parse line - too few words", filename, n);
goto finish;
}
*d = 0;
if (pa_atou(v, &k) < 0) {
- pa_log(__FILE__": [%s:%u] failed to parse volume\n", filename, n);
+ pa_log(__FILE__": [%s:%u] failed to parse volume", filename, n);
goto finish;
}
@@ -125,7 +125,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\n", filename, n);
+ pa_log(__FILE__": [%s:%u] invalid regular expression", filename, n);
goto finish;
}
@@ -173,7 +173,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\n", si->name, r->volume);
+ pa_log_debug(__FILE__": 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);
}
@@ -186,7 +186,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\n");
+ pa_log(__FILE__": Failed to parse module arguments");
goto fail;
}
diff --git a/src/modules/module-mmkbd-evdev.c b/src/modules/module-mmkbd-evdev.c
index b60f786d..79194ad8 100644
--- a/src/modules/module-mmkbd-evdev.c
+++ b/src/modules/module-mmkbd-evdev.c
@@ -81,7 +81,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.\n");
+ pa_log(__FILE__": lost connection to evdev device.");
goto fail;
}
@@ -89,14 +89,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)) <= 0) {
- pa_log(__FILE__": failed to read from event device: %s\n", strerror(errno));
+ pa_log(__FILE__": failed to read from event device: %s", strerror(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\n", ev.code, ev.value);
+ pa_log_debug(__FILE__": key code=%u, value=%u", ev.code, ev.value);
switch (ev.code) {
case KEY_VOLUMEDOWN: volchange = DOWN; break;
@@ -108,7 +108,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'\n", u->sink_name);
+ pa_log(__FILE__": failed to get sink '%s'", u->sink_name);
else {
pa_volume_t v = pa_cvolume_avg(pa_sink_get_volume(s, PA_MIXER_HARDWARE));
pa_cvolume cv;
@@ -167,7 +167,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\n");
+ pa_log(__FILE__": Failed to parse module arguments");
goto fail;
}
@@ -179,40 +179,40 @@ int pa__init(pa_core *c, pa_module*m) {
u->mute_toggle_save = 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\n", strerror(errno));
+ pa_log(__FILE__": failed to open evdev device: %s", strerror(errno));
goto fail;
}
if (ioctl(u->fd, EVIOCGVERSION, &version) < 0) {
- pa_log(__FILE__": EVIOCGVERSION failed: %s\n", strerror(errno));
+ pa_log(__FILE__": EVIOCGVERSION failed: %s", strerror(errno));
goto fail;
}
- pa_log_info(__FILE__": evdev driver version %i.%i.%i\n", version >> 16, (version >> 8) & 0xff, version & 0xff);
+ pa_log_info(__FILE__": 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\n", strerror(errno));
+ pa_log(__FILE__": EVIOCGID failed: %s", strerror(errno));
goto fail;
}
- pa_log_info(__FILE__": evdev vendor 0x%04hx product 0x%04hx version 0x%04hx bustype %u\n",
+ pa_log_info(__FILE__": evdev vendor 0x%04hx product 0x%04hx version 0x%04hx bustype %u",
input_id.vendor, input_id.product, input_id.version, input_id.bustype);
if(ioctl(u->fd, EVIOCGNAME(sizeof(name)), name) < 0) {
- pa_log(__FILE__": EVIOCGNAME failed: %s\n", strerror(errno));
+ pa_log(__FILE__": EVIOCGNAME failed: %s", strerror(errno));
goto fail;
}
- pa_log_info(__FILE__": evdev device name: %s\n", name);
+ pa_log_info(__FILE__": 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\n", strerror(errno));
+ pa_log(__FILE__": EVIOCGBIT failed: %s", strerror(errno));
goto fail;
}
if (!test_bit(EV_KEY, evtype_bitmask)) {
- pa_log(__FILE__": device has no keys.\n");
+ pa_log(__FILE__": 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 abc531b3..e3caf55a 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.\n");
+ pa_log(__FILE__": failed to parse module arguments.");
goto finish;
}
if (pa_modargs_get_value_s32(ma, "fd", &fd) < 0) {
- pa_log(__FILE__": invalid file descriptor.\n");
+ pa_log(__FILE__": invalid file descriptor.");
goto finish;
}
diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index 5731a403..61178239 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -92,13 +92,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.\n");
+ pa_log(__FILE__": 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.\n");
+ pa_log(__FILE__": invalid sample format specification.");
goto fail;
}
@@ -108,7 +108,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, NULL))) {
- pa_log(__FILE__": failed to create sink.\n");
+ pa_log(__FILE__": failed to create sink.");
goto fail;
}
diff --git a/src/modules/module-oss-mmap.c b/src/modules/module-oss-mmap.c
index 82f65a3c..9687c908 100644
--- a/src/modules/module-oss-mmap.c
+++ b/src/modules/module-oss-mmap.c
@@ -130,7 +130,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\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETOPTR: %s", strerror(errno));
return;
}
@@ -192,7 +192,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\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETIPTR: %s", strerror(errno));
return;
}
@@ -225,7 +225,7 @@ static int sink_get_hw_volume(pa_sink *s) {
struct userdata *u = s->userdata;
if (pa_oss_get_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) {
- pa_log_info(__FILE__": device doesn't support reading mixer settings: %s\n", strerror(errno));
+ pa_log_info(__FILE__": device doesn't support reading mixer settings: %s", strerror(errno));
s->get_hw_volume = NULL;
return -1;
}
@@ -237,7 +237,7 @@ static int sink_set_hw_volume(pa_sink *s) {
struct userdata *u = s->userdata;
if (pa_oss_set_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) {
- pa_log_info(__FILE__": device doesn't support writing mixer settings: %s\n", strerror(errno));
+ pa_log_info(__FILE__": device doesn't support writing mixer settings: %s", strerror(errno));
s->set_hw_volume = NULL;
return -1;
}
@@ -265,17 +265,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.\n");
+ pa_log(__FILE__": 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.\n");
+ pa_log(__FILE__": record= and playback= expect numeric arguments.");
goto fail;
}
if (!playback && !record) {
- pa_log(__FILE__": neither playback nor record enabled for device.\n");
+ pa_log(__FILE__": neither playback nor record enabled for device.");
goto fail;
}
@@ -284,13 +284,13 @@ int pa__init(pa_core *c, pa_module*m) {
nfrags = 12;
frag_size = 1024;
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\n");
+ pa_log(__FILE__": failed to parse fragments arguments");
goto fail;
}
u->sample_spec = c->default_sample_spec;
if (pa_modargs_get_sample_spec(ma, &u->sample_spec) < 0) {
- pa_log(__FILE__": failed to parse sample specification\n");
+ pa_log(__FILE__": failed to parse sample specification");
goto fail;
}
@@ -298,16 +298,16 @@ 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'.\n", hwdesc);
+ pa_log_info(__FILE__": hardware name is '%s'.", hwdesc);
else
hwdesc[0] = 0;
if (!(caps & DSP_CAP_MMAP) || !(caps & DSP_CAP_REALTIME) || !(caps & DSP_CAP_TRIGGER)) {
- pa_log(__FILE__": OSS device not mmap capable.\n");
+ pa_log(__FILE__": OSS device not mmap capable.");
goto fail;
}
- pa_log_info(__FILE__": device opened in %s mode.\n", mode == O_WRONLY ? "O_WRONLY" : (mode == O_RDONLY ? "O_RDONLY" : "O_RDWR"));
+ pa_log_info(__FILE__": 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(u->fd, nfrags, frag_size) < 0)
@@ -318,19 +318,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\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETISPACE: %s", strerror(errno));
goto fail;
}
- pa_log_info(__FILE__": input -- %u fragments of size %u.\n", info.fragstotal, info.fragsize);
+ pa_log_info(__FILE__": 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.\n");
+ pa_log(__FILE__": mmap failed for input. Changing to O_WRONLY mode.");
mode = O_WRONLY;
} else {
- pa_log(__FILE__": mmap(): %s\n", strerror(errno));
+ pa_log(__FILE__": mmap(): %s", strerror(errno));
goto fail;
}
} else {
@@ -353,19 +353,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\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETOSPACE: %s", strerror(errno));
goto fail;
}
- pa_log_info(__FILE__": output -- %u fragments of size %u.\n", info.fragstotal, info.fragsize);
+ pa_log_info(__FILE__": 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.\n");
+ pa_log(__FILE__": mmap filed for output. Changing to O_RDONLY mode.");
mode = O_RDONLY;
} else {
- pa_log(__FILE__": mmap(): %s\n", strerror(errno));
+ pa_log(__FILE__": mmap(): %s", strerror(errno));
goto fail;
}
} else {
@@ -392,12 +392,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\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_SETTRIGGER: %s", strerror(errno));
goto fail;
}
if (ioctl(u->fd, SNDCTL_DSP_SETTRIGGER, &enable_bits) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_SETTRIGGER: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_SETTRIGGER: %s", strerror(errno));
goto fail;
}
diff --git a/src/modules/module-oss.c b/src/modules/module-oss.c
index 0a3c6143..67ece5a7 100644
--- a/src/modules/module-oss.c
+++ b/src/modules/module-oss.c
@@ -133,7 +133,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\n", strerror(errno));
+ pa_log(__FILE__": write() failed: %s", strerror(errno));
break;
}
@@ -186,7 +186,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\n", strerror(errno));
+ pa_log(__FILE__": read() failed: %s", strerror(errno));
break;
}
@@ -221,7 +221,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\n", strerror(errno));
+ pa_log_info(__FILE__": device doesn't support SNDCTL_DSP_GETODELAY: %s", strerror(errno));
s->get_latency = NULL;
return 0;
}
@@ -257,7 +257,7 @@ static int sink_get_hw_volume(pa_sink *s) {
struct userdata *u = s->userdata;
if (pa_oss_get_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) {
- pa_log_info(__FILE__": device doesn't support reading mixer settings: %s\n", strerror(errno));
+ pa_log_info(__FILE__": device doesn't support reading mixer settings: %s", strerror(errno));
s->get_hw_volume = NULL;
return -1;
}
@@ -269,7 +269,7 @@ static int sink_set_hw_volume(pa_sink *s) {
struct userdata *u = s->userdata;
if (pa_oss_set_volume(u->fd, &s->sample_spec, &s->hw_volume) < 0) {
- pa_log_info(__FILE__": device doesn't support writing mixer settings: %s\n", strerror(errno));
+ pa_log_info(__FILE__": device doesn't support writing mixer settings: %s", strerror(errno));
s->set_hw_volume = NULL;
return -1;
}
@@ -293,17 +293,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.\n");
+ pa_log(__FILE__": 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.\n");
+ pa_log(__FILE__": record= and playback= expect numeric argument.");
goto fail;
}
if (!playback && !record) {
- pa_log(__FILE__": neither playback nor record enabled for device.\n");
+ pa_log(__FILE__": neither playback nor record enabled for device.");
goto fail;
}
@@ -312,13 +312,13 @@ int pa__init(pa_core *c, pa_module*m) {
nfrags = 12;
frag_size = 1024;
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\n");
+ pa_log(__FILE__": failed to parse fragments arguments");
goto fail;
}
ss = c->default_sample_spec;
if (pa_modargs_get_sample_spec(ma, &ss) < 0) {
- pa_log(__FILE__": failed to parse sample specification\n");
+ pa_log(__FILE__": failed to parse sample specification");
goto fail;
}
@@ -326,11 +326,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'.\n", hwdesc);
+ pa_log_info(__FILE__": hardware name is '%s'.", hwdesc);
else
hwdesc[0] = 0;
- pa_log_info(__FILE__": device opened in %s mode.\n", mode == O_WRONLY ? "O_WRONLY" : (mode == O_RDONLY ? "O_RDONLY" : "O_RDWR"));
+ pa_log_info(__FILE__": 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)
@@ -340,7 +340,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\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETBLKSIZE: %s", strerror(errno));
goto fail;
}
assert(frag_size);
@@ -351,13 +351,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.\n", info.fragstotal, info.fragsize);
+ pa_log_info(__FILE__": 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.\n", info.fragstotal, info.fragsize);
+ pa_log_info(__FILE__": 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 6ace377f..4ddf26ac 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -91,7 +91,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() failed: %s\n", strerror(errno));
+ pa_log(__FILE__": write() failed: %s", strerror(errno));
return;
}
@@ -141,32 +141,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\n");
+ pa_log(__FILE__": 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\n");
+ pa_log(__FILE__": 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\n", p, strerror(errno));
+ pa_log(__FILE__": open('%s'): %s", p, strerror(errno));
goto fail;
}
pa_fd_set_cloexec(fd, 1);
if (fstat(fd, &st) < 0) {
- pa_log(__FILE__": fstat('%s'): %s\n", p, strerror(errno));
+ pa_log(__FILE__": fstat('%s'): %s", p, strerror(errno));
goto fail;
}
if (!S_ISFIFO(st.st_mode)) {
- pa_log(__FILE__": '%s' is not a FIFO.\n", p);
+ pa_log(__FILE__": '%s' is not a FIFO.", p);
goto fail;
}
@@ -177,7 +177,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, NULL))) {
- pa_log(__FILE__": failed to create sink.\n");
+ pa_log(__FILE__": 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 a7bb0ce7..d3753d25 100644
--- a/src/modules/module-pipe-source.c
+++ b/src/modules/module-pipe-source.c
@@ -88,7 +88,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() failed: %s\n", strerror(errno));
+ pa_log(__FILE__": read() failed: %s", strerror(errno));
return;
}
@@ -119,32 +119,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\n");
+ pa_log(__FILE__": 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\n");
+ pa_log(__FILE__": 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\n", p, strerror(errno));
+ pa_log(__FILE__": open('%s'): %s", p, strerror(errno));
goto fail;
}
pa_fd_set_cloexec(fd, 1);
if (fstat(fd, &st) < 0) {
- pa_log(__FILE__": fstat('%s'): %s\n", p, strerror(errno));
+ pa_log(__FILE__": fstat('%s'): %s", p, strerror(errno));
goto fail;
}
if (!S_ISFIFO(st.st_mode)) {
- pa_log(__FILE__": '%s' is not a FIFO.\n", p);
+ pa_log(__FILE__": '%s' is not a FIFO.", p);
goto fail;
}
@@ -154,7 +154,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, NULL))) {
- pa_log(__FILE__": failed to create source.\n");
+ pa_log(__FILE__": 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 641e3624..749a7ace 100644
--- a/src/modules/module-protocol-stub.c
+++ b/src/modules/module-protocol-stub.c
@@ -161,12 +161,12 @@ static pa_socket_server *create_socket_server(pa_core *c, pa_modargs *ma) {
const char *listen_on;
if (pa_modargs_get_value_boolean(ma, "loopback", &loopback) < 0) {
- pa_log(__FILE__": loopback= expects a boolean argument.\n");
+ pa_log(__FILE__": loopback= expects a boolean argument.");
return NULL;
}
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.\n");
+ pa_log(__FILE__": port= expects a numerical argument between 1 and 65535.");
return NULL;
}
@@ -194,12 +194,12 @@ static pa_socket_server *create_socket_server(pa_core *c, pa_modargs *ma) {
pa_runtime_path(v, tmp, sizeof(tmp));
if (pa_make_secure_parent_dir(tmp) < 0) {
- pa_log(__FILE__": Failed to create secure socket directory.\n");
+ pa_log(__FILE__": Failed to create secure socket directory.");
return NULL;
}
if ((r = pa_unix_socket_remove_stale(tmp)) < 0) {
- pa_log(__FILE__": Failed to remove stale UNIX socket '%s': %s\n", tmp, strerror(errno));
+ pa_log(__FILE__": Failed to remove stale UNIX socket '%s': %s", tmp, strerror(errno));
return NULL;
}
@@ -220,7 +220,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\n");
+ pa_log(__FILE__": Failed to parse module arguments");
goto finish;
}
@@ -246,9 +246,9 @@ void pa__done(pa_core *c, pa_module*m) {
#if defined(USE_PROTOCOL_ESOUND) && !defined(USE_TCP_SOCKETS)
if (remove(ESD_UNIX_SOCKET_NAME) != 0)
- pa_log("%s: Failed to remove %s : %s.\n", __FILE__, ESD_UNIX_SOCKET_NAME, strerror (errno));
+ pa_log("%s: Failed to remove %s : %s.", __FILE__, ESD_UNIX_SOCKET_NAME, strerror (errno));
if (remove(ESD_UNIX_SOCKET_DIR) != 0)
- pa_log("%s: Failed to remove %s : %s.\n", __FILE__, ESD_UNIX_SOCKET_DIR, strerror (errno));
+ pa_log("%s: Failed to remove %s : %s.", __FILE__, ESD_UNIX_SOCKET_DIR, strerror (errno));
#endif
protocol_free(m->userdata);
diff --git a/src/modules/module-sine.c b/src/modules/module-sine.c
index 446e3974..d5a0fa47 100644
--- a/src/modules/module-sine.c
+++ b/src/modules/module-sine.c
@@ -110,7 +110,7 @@ int pa__init(pa_core *c, pa_module*m) {
char t[256];
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
- pa_log(__FILE__": Failed to parse module arguments\n");
+ pa_log(__FILE__": Failed to parse module arguments");
goto fail;
}
@@ -123,7 +123,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.\n");
+ pa_log(__FILE__": No such sink.");
goto fail;
}
@@ -133,7 +133,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\n");
+ pa_log(__FILE__": Invalid frequency specification");
goto fail;
}
diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c
index 7356cb7b..1de21aed 100644
--- a/src/modules/module-solaris.c
+++ b/src/modules/module-solaris.c
@@ -150,7 +150,7 @@ static void do_write(struct userdata *u) {
len = memchunk->length;
if ((r = pa_iochannel_write(u->io, (uint8_t*) memchunk->memblock->data + memchunk->index, len)) < 0) {
- pa_log(__FILE__": write() failed: %s\n", strerror(errno));
+ pa_log(__FILE__": write() failed: %s", strerror(errno));
return;
}
@@ -172,7 +172,7 @@ static void do_write(struct userdata *u) {
* Write 0 bytes which will generate a SIGPOLL when "played".
*/
if (write(u->fd, NULL, 0) < 0) {
- pa_log(__FILE__": write() failed: %s\n", strerror(errno));
+ pa_log(__FILE__": write() failed: %s", strerror(errno));
return;
}
}
@@ -196,7 +196,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\n", strerror(errno));
+ pa_log(__FILE__": read() failed: %s", strerror(errno));
return;
}
@@ -283,9 +283,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.\n");
+ pa_log(__FILE__": AUDIO_SETINFO: Unsupported volume.");
else
- pa_log(__FILE__": AUDIO_SETINFO: %s\n", strerror(errno));
+ pa_log(__FILE__": AUDIO_SETINFO: %s", strerror(errno));
return -1;
}
@@ -349,9 +349,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.\n");
+ pa_log(__FILE__": AUDIO_SETINFO: Unsupported sample format.");
else
- pa_log(__FILE__": AUDIO_SETINFO: %s\n", strerror(errno));
+ pa_log(__FILE__": AUDIO_SETINFO: %s", strerror(errno));
return -1;
}
@@ -367,9 +367,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.\n");
+ pa_log(__FILE__": AUDIO_SETINFO: Unsupported buffer size.");
else
- pa_log(__FILE__": AUDIO_SETINFO: %s\n", strerror(errno));
+ pa_log(__FILE__": AUDIO_SETINFO: %s", strerror(errno));
return -1;
}
@@ -388,17 +388,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.\n");
+ pa_log(__FILE__": 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.\n");
+ pa_log(__FILE__": record= and playback= expect numeric argument.");
goto fail;
}
if (!playback && !record) {
- pa_log(__FILE__": neither playback nor record enabled for device.\n");
+ pa_log(__FILE__": neither playback nor record enabled for device.");
goto fail;
}
@@ -406,20 +406,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\n");
+ pa_log(__FILE__": failed to parse buffer size argument");
goto fail;
}
ss = c->default_sample_spec;
if (pa_modargs_get_sample_spec(ma, &ss) < 0) {
- pa_log(__FILE__": failed to parse sample specification\n");
+ pa_log(__FILE__": 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.\n", mode == O_WRONLY ? "O_WRONLY" : (mode == O_RDONLY ? "O_RDONLY" : "O_RDWR"));
+ pa_log_info(__FILE__": 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 136702fc..df9c51fb 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -182,7 +182,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\n");
+ pa_log(__FILE__": stream killed");
die(u);
}
@@ -232,13 +232,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\n");
+ pa_log(__FILE__": invalid protocol reply");
die(u);
return;
}
if (channel != u->channel) {
- pa_log(__FILE__": recieved data for invalid channel\n");
+ pa_log(__FILE__": recieved data for invalid channel");
die(u);
return;
}
@@ -260,9 +260,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.\n");
+ pa_log(__FILE__": failed to get latency.");
else
- pa_log(__FILE__": protocol error.\n");
+ pa_log(__FILE__": protocol error.");
die(u);
return;
}
@@ -276,7 +276,7 @@ static void stream_get_latency_callback(pa_pdispatch *pd, uint32_t command, PA_G
pa_tagstruct_get_timeval(t, &remote) < 0 ||
pa_tagstruct_getu64(t, &counter) < 0 ||
!pa_tagstruct_eof(t)) {
- pa_log(__FILE__": invalid reply.\n");
+ pa_log(__FILE__": invalid reply.");
die(u);
return;
}
@@ -303,7 +303,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\n", (double) u->host_latency); */
+/* pa_log(__FILE__": estimated host latency: %0.0f usec", (double) u->host_latency); */
}
static void request_latency(struct userdata *u) {
@@ -335,9 +335,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.\n");
+ pa_log(__FILE__": failed to create stream.");
else
- pa_log(__FILE__": protocol error.\n");
+ pa_log(__FILE__": protocol error.");
die(u);
return;
}
@@ -348,7 +348,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.\n");
+ pa_log(__FILE__": invalid reply.");
die(u);
return;
}
@@ -367,9 +367,9 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t
if (command != PA_COMMAND_REPLY || !pa_tagstruct_eof(t)) {
if (command == PA_COMMAND_ERROR)
- pa_log(__FILE__": failed to authenticate\n");
+ pa_log(__FILE__": failed to authenticate");
else
- pa_log(__FILE__": protocol error.\n");
+ pa_log(__FILE__": protocol error.");
die(u);
return;
}
@@ -426,7 +426,7 @@ static void pstream_die_callback(pa_pstream *p, void *userdata) {
struct userdata *u = userdata;
assert(p && u);
- pa_log(__FILE__": stream died.\n");
+ pa_log(__FILE__": stream died.");
die(u);
}
@@ -436,7 +436,7 @@ static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, void *user
assert(p && packet && u);
if (pa_pdispatch_run(u->pdispatch, packet, u) < 0) {
- pa_log(__FILE__": invalid packet\n");
+ pa_log(__FILE__": invalid packet");
die(u);
}
}
@@ -447,7 +447,7 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o
assert(p && chunk && u);
if (channel != u->channel) {
- pa_log(__FILE__": recieved memory block on bad channel.\n");
+ pa_log(__FILE__": recieved memory block on bad channel.");
die(u);
return;
}
@@ -466,7 +466,7 @@ static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata
u->client = NULL;
if (!io) {
- pa_log(__FILE__": connection failed.\n");
+ pa_log(__FILE__": connection failed.");
pa_module_unload_request(u->module);
return;
}
@@ -544,7 +544,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.\n");
+ pa_log_debug(__FILE__": using already loaded auth cookie.");
pa_authkey_prop_ref(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME);
u->auth_cookie_in_property = 1;
return 0;
@@ -556,7 +556,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.\n");
+ pa_log_debug(__FILE__": 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;
@@ -572,7 +572,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\n");
+ pa_log(__FILE__": failed to parse module arguments");
goto fail;
}
@@ -602,18 +602,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.\n");
+ pa_log(__FILE__": no server specified.");
goto fail;
}
ss = c->default_sample_spec;
if (pa_modargs_get_sample_spec(ma, &ss) < 0) {
- pa_log(__FILE__": invalid sample format specification\n");
+ pa_log(__FILE__": 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'\n", u->server_name);
+ pa_log(__FILE__": failed to connect to server '%s'", u->server_name);
goto fail;
}
@@ -624,7 +624,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, NULL))) {
- pa_log(__FILE__": failed to create sink.\n");
+ pa_log(__FILE__": failed to create sink.");
goto fail;
}
@@ -636,7 +636,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, NULL))) {
- pa_log(__FILE__": failed to create source.\n");
+ pa_log(__FILE__": failed to create source.");
goto fail;
}
diff --git a/src/modules/module-waveout.c b/src/modules/module-waveout.c
index 2176e6e7..02f865c5 100644
--- a/src/modules/module-waveout.c
+++ b/src/modules/module-waveout.c
@@ -159,12 +159,12 @@ static void do_write(struct userdata *u)
res = waveOutPrepareHeader(u->hwo, hdr, sizeof(WAVEHDR));
if (res != MMSYSERR_NOERROR) {
- pa_log_error(__FILE__ ": ERROR: Unable to prepare waveOut block: %d\n",
+ pa_log_error(__FILE__ ": ERROR: Unable to prepare waveOut block: %d",
res);
}
res = waveOutWrite(u->hwo, hdr, sizeof(WAVEHDR));
if (res != MMSYSERR_NOERROR) {
- pa_log_error(__FILE__ ": ERROR: Unable to write waveOut block: %d\n",
+ pa_log_error(__FILE__ ": ERROR: Unable to write waveOut block: %d",
res);
}
@@ -214,12 +214,12 @@ static void do_read(struct userdata *u)
res = waveInPrepareHeader(u->hwi, hdr, sizeof(WAVEHDR));
if (res != MMSYSERR_NOERROR) {
- pa_log_error(__FILE__ ": ERROR: Unable to prepare waveIn block: %d\n",
+ pa_log_error(__FILE__ ": ERROR: Unable to prepare waveIn block: %d",
res);
}
res = waveInAddBuffer(u->hwi, hdr, sizeof(WAVEHDR));
if (res != MMSYSERR_NOERROR) {
- pa_log_error(__FILE__ ": ERROR: Unable to add waveIn block: %d\n",
+ pa_log_error(__FILE__ ": ERROR: Unable to add waveIn block: %d",
res);
}
@@ -378,7 +378,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.\n");
+ pa_log_error(__FILE__": ERROR: More than two channels not supported.");
return -1;
}
@@ -391,7 +391,7 @@ static int ss_to_waveformat(pa_sample_spec *ss, LPWAVEFORMATEX wf) {
case 44100:
break;
default:
- pa_log_error(__FILE__": ERROR: Unsupported sample rate.\n");
+ pa_log_error(__FILE__": ERROR: Unsupported sample rate.");
return -1;
}
@@ -402,7 +402,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.\n");
+ pa_log_error(__FILE__": ERROR: Unsupported sample format.");
return -1;
}
@@ -429,30 +429,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.\n");
+ pa_log(__FILE__": 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.\n");
+ pa_log(__FILE__": record= and playback= expect boolean argument.");
goto fail;
}
if (!playback && !record) {
- pa_log(__FILE__": neither playback nor record enabled for device.\n");
+ pa_log(__FILE__": neither playback nor record enabled for device.");
goto fail;
}
nfrags = 20;
frag_size = 1024;
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\n");
+ pa_log(__FILE__": failed to parse fragments arguments");
goto fail;
}
ss = c->default_sample_spec;
if (pa_modargs_get_sample_spec(ma, &ss) < 0) {
- pa_log(__FILE__": failed to parse sample specification\n");
+ pa_log(__FILE__": failed to parse sample specification");
goto fail;
}
@@ -466,13 +466,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.\n");
+ pa_log_debug(__FILE__": 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.\n");
+ pa_log_debug(__FILE__": Opened waveOut subsystem.");
}
InitializeCriticalSection(&u->crit);
diff --git a/src/modules/module-x11-bell.c b/src/modules/module-x11-bell.c
index d59f3f59..27ceb7f9 100644
--- a/src/modules/module-x11-bell.c
+++ b/src/modules/module-x11-bell.c
@@ -71,7 +71,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\n", u->sink_name);
+ pa_log(__FILE__": Invalid sink: %s", u->sink_name);
return -1;
}
@@ -90,7 +90,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.\n");
+ pa_log_info(__FILE__": 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);
}
@@ -105,7 +105,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\n");
+ pa_log(__FILE__": failed to parse module arguments");
goto fail;
}
@@ -124,7 +124,7 @@ int pa__init(pa_core *c, pa_module*m) {
minor = XkbMinorVersion;
if (!XkbLibraryVersion(&major, &minor)) {
- pa_log(__FILE__": XkbLibraryVersion() failed\n");
+ pa_log(__FILE__": XkbLibraryVersion() failed");
goto fail;
}
@@ -133,7 +133,7 @@ int pa__init(pa_core *c, pa_module*m) {
if (!XkbQueryExtension(u->display, NULL, &u->xkb_event_base, NULL, &major, &minor)) {
- pa_log(__FILE__": XkbQueryExtension() failed\n");
+ pa_log(__FILE__": XkbQueryExtension() failed");
goto fail;
}
diff --git a/src/modules/module-x11-publish.c b/src/modules/module-x11-publish.c
index 6d9036f5..cee9cb3f 100644
--- a/src/modules/module-x11-publish.c
+++ b/src/modules/module-x11-publish.c
@@ -78,7 +78,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.\n");
+ pa_log_debug(__FILE__": using already loaded auth cookie.");
pa_authkey_prop_ref(u->core, PA_NATIVE_COOKIE_PROPERTY_NAME);
u->auth_cookie_in_property = 1;
return 0;
@@ -90,7 +90,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.\n");
+ pa_log_debug(__FILE__": 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;
@@ -108,7 +108,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\n");
+ pa_log(__FILE__": failed to parse module arguments");
goto fail;
}
@@ -169,7 +169,7 @@ void pa__done(pa_core *c, pa_module*m) {
/* Yes, here is a race condition */
if (!pa_x11_get_prop(u->display, "POLYP_ID", t, sizeof(t)) || strcmp(t, u->id))
- pa_log("WARNING: Polypaudio information vanished from X11!\n");
+ pa_log_warn(__FILE__": Polypaudio information vanished from X11!");
else {
pa_x11_del_prop(u->display, "POLYP_ID");
pa_x11_del_prop(u->display, "POLYP_SERVER");
diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c
index d79355ce..f8607bef 100644
--- a/src/modules/module-zeroconf-publish.c
+++ b/src/modules/module-zeroconf-publish.c
@@ -141,7 +141,7 @@ static int publish_service(struct userdata *u, struct service *s) {
snprintf(t, sizeof(t), "Networked Audio Device %s on %s", s->name, pa_get_host_name(hn, sizeof(hn)));
if (sw_text_record_init(&txt) != SW_OKAY) {
- pa_log(__FILE__": sw_text_record_init() failed\n");
+ pa_log(__FILE__": sw_text_record_init() failed");
goto finish;
}
free_txt = 1;
@@ -168,7 +168,7 @@ static int publish_service(struct userdata *u, struct service *s) {
s->loaded.type == PA_NAMEREG_SINK ? SERVICE_NAME_SINK : SERVICE_NAME_SOURCE,
NULL, NULL, u->port, sw_text_record_bytes(txt), sw_text_record_len(txt),
publish_reply, s, &s->oid) != SW_OKAY) {
- pa_log(__FILE__": failed to register sink on zeroconf.\n");
+ pa_log(__FILE__": failed to register sink on zeroconf.");
goto finish;
}
@@ -179,7 +179,7 @@ static int publish_service(struct userdata *u, struct service *s) {
s->autoload.type == PA_NAMEREG_SINK ? SERVICE_NAME_SINK : SERVICE_NAME_SOURCE,
NULL, NULL, u->port, sw_text_record_bytes(txt), sw_text_record_len(txt),
publish_reply, s, &s->oid) != SW_OKAY) {
- pa_log(__FILE__": failed to register sink on zeroconf.\n");
+ pa_log(__FILE__": failed to register sink on zeroconf.");
goto finish;
}
@@ -391,12 +391,12 @@ int pa__init(pa_core *c, pa_module*m) {
sw_text_record txt;
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
- pa_log(__FILE__": failed to parse module arguments.\n");
+ pa_log(__FILE__": 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.\n");
+ pa_log(__FILE__": invalid port specified.");
goto fail;
}
@@ -433,7 +433,7 @@ int pa__init(pa_core *c, pa_module*m) {
snprintf(t, sizeof(t), "Networked Audio Server on %s", pa_get_host_name(hn, sizeof(hn)));
if (sw_text_record_init(&txt) != SW_OKAY) {
- pa_log(__FILE__": sw_text_record_init() failed\n");
+ pa_log(__FILE__": sw_text_record_init() failed");
goto fail;
}
free_txt = 1;
@@ -444,7 +444,7 @@ int pa__init(pa_core *c, pa_module*m) {
SERVICE_NAME_SERVER,
NULL, NULL, u->port, sw_text_record_bytes(txt), sw_text_record_len(txt),
publish_reply, u, &u->server_oid) != SW_OKAY) {
- pa_log(__FILE__": failed to register server on zeroconf.\n");
+ pa_log(__FILE__": failed to register server on zeroconf.");
goto fail;
}
diff --git a/src/modules/oss-util.c b/src/modules/oss-util.c
index 9fb5d38a..2c12e28d 100644
--- a/src/modules/oss-util.c
+++ b/src/modules/oss-util.c
@@ -51,7 +51,7 @@ 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\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETCAPS: %s", strerror(errno));
goto fail;
}
@@ -63,20 +63,20 @@ int pa_oss_open(const char *device, int *mode, int* pcaps) {
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\n", device, strerror(errno));
+ pa_log(__FILE__": open('%s'): %s", device, strerror(errno));
goto fail;
}
}
} else {
if ((fd = open(device, *mode|O_NDELAY)) < 0) {
- pa_log(__FILE__": open('%s'): %s\n", device, strerror(errno));
+ pa_log(__FILE__": open('%s'): %s", device, strerror(errno));
goto fail;
}
}
if (pcaps) {
if (ioctl(fd, SNDCTL_DSP_GETCAPS, pcaps) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_GETCAPS: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_GETCAPS: %s", strerror(errno));
goto fail;
}
}
@@ -114,7 +114,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\n", format != AFMT_U8 ? "No supported sample format" : strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_SETFMT: %s", format != AFMT_U8 ? "No supported sample format" : strerror(errno));
return -1;
} else
ss->format = PA_SAMPLE_U8;
@@ -126,7 +126,7 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) {
channels = ss->channels;
if (ioctl(fd, SNDCTL_DSP_CHANNELS, &channels) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_CHANNELS: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_CHANNELS: %s", strerror(errno));
return -1;
}
assert(channels);
@@ -134,7 +134,7 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) {
speed = ss->rate;
if (ioctl(fd, SNDCTL_DSP_SPEED, &speed) < 0) {
- pa_log(__FILE__": SNDCTL_DSP_SPEED: %s\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_SPEED: %s", strerror(errno));
return -1;
}
assert(speed);
@@ -160,7 +160,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\n", strerror(errno));
+ pa_log(__FILE__": SNDCTL_DSP_SETFRAGMENT: %s", strerror(errno));
return -1;
}
@@ -183,7 +183,7 @@ int pa_oss_get_volume(int fd, const pa_sample_spec *ss, pa_cvolume *volume) {
if ((volume->channels = ss->channels) >= 2)
volume->values[1] = (((vol >> 8) & 0xFF) * PA_VOLUME_NORM) / 100;
- pa_log_debug(__FILE__": Read mixer settings: %s\n", pa_cvolume_snprint(cv, sizeof(cv), volume));
+ pa_log_debug(__FILE__": Read mixer settings: %s", pa_cvolume_snprint(cv, sizeof(cv), volume));
return 0;
}
@@ -199,7 +199,7 @@ int pa_oss_set_volume(int fd, const pa_sample_spec *ss, const pa_cvolume *volume
if (ioctl(fd, SOUND_MIXER_WRITE_PCM, &vol) < 0)
return -1;
- pa_log_debug(__FILE__": Wrote mixer settings: %s\n", pa_cvolume_snprint(cv, sizeof(cv), volume));
+ pa_log_debug(__FILE__": Wrote mixer settings: %s", pa_cvolume_snprint(cv, sizeof(cv), volume));
return 0;
}
@@ -228,7 +228,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\n", strerror(errno));
+ pa_log_warn(__FILE__": failed to open OSS sndstat device: %s", strerror(errno));
return -1;
}