mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-30 11:08:50 -05:00
remove all occurences of
pa_logXXX(__FILE__":
and replace them by
pa_logXXX("
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1272 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
1bc62d5ec6
commit
e385d93e5a
87 changed files with 714 additions and 714 deletions
|
|
@ -54,7 +54,7 @@ static int generate(int fd, void *ret_data, size_t length) {
|
|||
ftruncate(fd, 0);
|
||||
|
||||
if ((r = pa_loop_write(fd, ret_data, length, NULL)) < 0 || (size_t) r != length) {
|
||||
pa_log(__FILE__": failed to write cookie file: %s", pa_cstrerror(errno));
|
||||
pa_log("failed to write cookie file: %s", pa_cstrerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ static int load(const char *fn, void *data, size_t length) {
|
|||
|
||||
if ((fd = open(fn, O_RDWR|O_CREAT|O_BINARY, S_IRUSR|S_IWUSR)) < 0) {
|
||||
if (errno != EACCES || (fd = open(fn, O_RDONLY|O_BINARY)) < 0) {
|
||||
pa_log(__FILE__": failed to open cookie file '%s': %s", fn, pa_cstrerror(errno));
|
||||
pa_log("failed to open cookie file '%s': %s", fn, pa_cstrerror(errno));
|
||||
goto finish;
|
||||
} else
|
||||
writable = 0;
|
||||
|
|
@ -85,15 +85,15 @@ static int load(const char *fn, void *data, size_t length) {
|
|||
unlock = pa_lock_fd(fd, 1) >= 0;
|
||||
|
||||
if ((r = pa_loop_read(fd, data, length, NULL)) < 0) {
|
||||
pa_log(__FILE__": failed to read cookie file '%s': %s", fn, pa_cstrerror(errno));
|
||||
pa_log("failed to read cookie file '%s': %s", fn, pa_cstrerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if ((size_t) r != length) {
|
||||
pa_log_debug(__FILE__": got %d bytes from cookie file '%s', expected %d", (int)r, fn, (int)length);
|
||||
pa_log_debug("got %d bytes from cookie file '%s', expected %d", (int)r, fn, (int)length);
|
||||
|
||||
if (!writable) {
|
||||
pa_log(__FILE__": unable to write cookie to read only file");
|
||||
pa_log("unable to write cookie to read only file");
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ int pa_authkey_load(const char *path, void *data, size_t length) {
|
|||
ret = load(path, data, length);
|
||||
|
||||
if (ret < 0)
|
||||
pa_log(__FILE__": Failed to load authorization key '%s': %s", path,
|
||||
pa_log("Failed to load authorization key '%s': %s", path,
|
||||
(ret == -1) ? pa_cstrerror(errno) : "file corrupt");
|
||||
|
||||
return ret;
|
||||
|
|
@ -182,14 +182,14 @@ int pa_authkey_save(const char *fn, const void *data, size_t length) {
|
|||
return -2;
|
||||
|
||||
if ((fd = open(p, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR)) < 0) {
|
||||
pa_log(__FILE__": failed to open cookie file '%s': %s", fn, pa_cstrerror(errno));
|
||||
pa_log("failed to open cookie file '%s': %s", fn, pa_cstrerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
unlock = pa_lock_fd(fd, 1) >= 0;
|
||||
|
||||
if ((r = pa_loop_write(fd, data, length, NULL)) < 0 || (size_t) r != length) {
|
||||
pa_log(__FILE__": failed to read cookie file '%s': %s", fn, pa_cstrerror(errno));
|
||||
pa_log("failed to read cookie file '%s': %s", fn, pa_cstrerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ static void client_kill(pa_client *client) {
|
|||
assert(client && client->userdata);
|
||||
c = client->userdata;
|
||||
|
||||
pa_log_debug(__FILE__": CLI client killed.");
|
||||
pa_log_debug("CLI client killed.");
|
||||
if (c->defer_kill)
|
||||
c->kill_requested = 1;
|
||||
else {
|
||||
|
|
@ -120,7 +120,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
|
|||
assert(line && c);
|
||||
|
||||
if (!s) {
|
||||
pa_log_debug(__FILE__": CLI got EOF from user.");
|
||||
pa_log_debug("CLI got EOF from user.");
|
||||
if (c->eof_callback)
|
||||
c->eof_callback(c, c->userdata);
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ pa_client *pa_client_new(pa_core *core, const char *driver, const char *name) {
|
|||
r = pa_idxset_put(core->clients, c, &c->index);
|
||||
assert(c->index != PA_IDXSET_INVALID && r >= 0);
|
||||
|
||||
pa_log_info(__FILE__": created %u \"%s\"", c->index, c->name);
|
||||
pa_log_info("created %u \"%s\"", c->index, c->name);
|
||||
pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_NEW, c->index);
|
||||
|
||||
pa_core_check_quit(core);
|
||||
|
|
@ -67,7 +67,7 @@ void pa_client_free(pa_client *c) {
|
|||
|
||||
pa_core_check_quit(c->core);
|
||||
|
||||
pa_log_info(__FILE__": freed %u \"%s\"", c->index, c->name);
|
||||
pa_log_info("freed %u \"%s\"", c->index, c->name);
|
||||
pa_subscription_post(c->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_REMOVE, c->index);
|
||||
pa_xfree(c->name);
|
||||
pa_xfree(c->driver);
|
||||
|
|
@ -77,7 +77,7 @@ void pa_client_free(pa_client *c) {
|
|||
void pa_client_kill(pa_client *c) {
|
||||
assert(c);
|
||||
if (!c->kill) {
|
||||
pa_log_warn(__FILE__": kill() operation not implemented for client %u", c->index);
|
||||
pa_log_warn("kill() operation not implemented for client %u", c->index);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ void pa_client_kill(pa_client *c) {
|
|||
void pa_client_set_name(pa_client *c, const char *name) {
|
||||
assert(c);
|
||||
|
||||
pa_log_info(__FILE__": client %u changed name from \"%s\" to \"%s\"", c->index, c->name, name);
|
||||
pa_log_info("client %u changed name from \"%s\" to \"%s\"", c->index, c->name, name);
|
||||
|
||||
pa_xfree(c->name);
|
||||
c->name = pa_xstrdup(name);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ static int next_assignment(const char *filename, unsigned line, const pa_config_
|
|||
if (!strcmp(lvalue, t->lvalue))
|
||||
return t->parse(filename, line, lvalue, rvalue, t->data, userdata);
|
||||
|
||||
pa_log(__FILE__": [%s:%u] Unknown lvalue '%s'.", filename, line, lvalue);
|
||||
pa_log("[%s:%u] Unknown lvalue '%s'.", filename, line, lvalue);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ static int parse_line(const char *filename, unsigned line, const pa_config_item
|
|||
return 0;
|
||||
|
||||
if (!(e = strchr(b, '='))) {
|
||||
pa_log(__FILE__": [%s:%u] Missing '='.", filename, line);
|
||||
pa_log("[%s:%u] Missing '='.", filename, line);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, void
|
|||
goto finish;
|
||||
}
|
||||
|
||||
pa_log_warn(__FILE__": WARNING: failed to open configuration file '%s': %s",
|
||||
pa_log_warn("WARNING: failed to open configuration file '%s': %s",
|
||||
filename, pa_cstrerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, void
|
|||
if (feof(f))
|
||||
break;
|
||||
|
||||
pa_log_warn(__FILE__": WARNING: failed to read configuration file '%s': %s",
|
||||
pa_log_warn("WARNING: failed to read configuration file '%s': %s",
|
||||
filename, pa_cstrerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
|
@ -149,7 +149,7 @@ int pa_config_parse_int(const char *filename, unsigned line, const char *lvalue,
|
|||
assert(filename && lvalue && rvalue && data);
|
||||
|
||||
if (pa_atoi(rvalue, &k) < 0) {
|
||||
pa_log(__FILE__": [%s:%u] Failed to parse numeric value: %s", filename, line, rvalue);
|
||||
pa_log("[%s:%u] Failed to parse numeric value: %s", filename, line, rvalue);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ int pa_config_parse_bool(const char *filename, unsigned line, const char *lvalue
|
|||
assert(filename && lvalue && rvalue && data);
|
||||
|
||||
if ((k = pa_parse_boolean(rvalue)) < 0) {
|
||||
pa_log(__FILE__": [%s:%u] Failed to parse boolean value: %s", filename, line, rvalue);
|
||||
pa_log("[%s:%u] Failed to parse boolean value: %s", filename, line, rvalue);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ static void add_file(pa_core *c, const char *pathname) {
|
|||
e = pa_path_get_filename(pathname);
|
||||
|
||||
if (stat(pathname, &st) < 0) {
|
||||
pa_log(__FILE__": stat('%s'): %s", pathname, pa_cstrerror(errno));
|
||||
pa_log("stat('%s'): %s", pathname, pa_cstrerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -382,7 +382,7 @@ int pa_scache_add_directory_lazy(pa_core *c, const char *pathname) {
|
|||
/* If that fails, try to open it as shell glob */
|
||||
|
||||
if (glob(pathname, GLOB_ERR|GLOB_NOSORT, NULL, &p) < 0) {
|
||||
pa_log(__FILE__": failed to open directory '%s': %s", pathname, pa_cstrerror(errno));
|
||||
pa_log("failed to open directory '%s': %s", pathname, pa_cstrerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ static void dump_event(const char * prefix, pa_subscription_event*e) {
|
|||
[PA_SUBSCRIPTION_EVENT_REMOVE] = "REMOVE"
|
||||
};
|
||||
|
||||
pa_log(__FILE__": %s event (%s|%s|%u)",
|
||||
pa_log("%s event (%s|%s|%u)",
|
||||
prefix,
|
||||
fac_table[e->type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK],
|
||||
type_table[e->type & PA_SUBSCRIPTION_EVENT_TYPE_MASK],
|
||||
|
|
@ -234,7 +234,7 @@ void pa_subscription_post(pa_core *c, pa_subscription_event_type_t t, uint32_t i
|
|||
* entry in the queue. */
|
||||
|
||||
free_event(i);
|
||||
pa_log_debug(__FILE__": dropped redundant event.");
|
||||
pa_log_debug("dropped redundant event.");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -242,7 +242,7 @@ void pa_subscription_post(pa_core *c, pa_subscription_event_type_t t, uint32_t i
|
|||
/* This object has changed. If a "new" or "change" event for
|
||||
* this object is still in the queue we can exit. */
|
||||
|
||||
pa_log_debug(__FILE__": dropped redundant event.");
|
||||
pa_log_debug("dropped redundant event.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,10 +128,10 @@ void pa_make_nonblock_fd(int fd) {
|
|||
u_long arg = 1;
|
||||
if (ioctlsocket(fd, FIONBIO, &arg) < 0) {
|
||||
if (WSAGetLastError() == WSAENOTSOCK)
|
||||
pa_log_warn(__FILE__": WARNING: Only sockets can be made non-blocking!");
|
||||
pa_log_warn("WARNING: Only sockets can be made non-blocking!");
|
||||
}
|
||||
#else
|
||||
pa_log_warn(__FILE__": WARNING: Non-blocking I/O not supported.!");
|
||||
pa_log_warn("WARNING: Non-blocking I/O not supported.!");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -359,7 +359,7 @@ void pa_check_signal_is_blocked(int sig) {
|
|||
if (pthread_sigmask(SIG_SETMASK, NULL, &set) < 0) {
|
||||
#endif
|
||||
if (sigprocmask(SIG_SETMASK, NULL, &set) < 0) {
|
||||
pa_log(__FILE__": sigprocmask(): %s", pa_cstrerror(errno));
|
||||
pa_log("sigprocmask(): %s", pa_cstrerror(errno));
|
||||
return;
|
||||
}
|
||||
#ifdef HAVE_PTHREAD
|
||||
|
|
@ -372,16 +372,16 @@ void pa_check_signal_is_blocked(int sig) {
|
|||
/* Check whether the signal is trapped */
|
||||
|
||||
if (sigaction(sig, NULL, &sa) < 0) {
|
||||
pa_log(__FILE__": sigaction(): %s", pa_cstrerror(errno));
|
||||
pa_log("sigaction(): %s", pa_cstrerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
if (sa.sa_handler != SIG_DFL)
|
||||
return;
|
||||
|
||||
pa_log(__FILE__": WARNING: %s is not trapped. This might cause malfunction!", pa_strsignal(sig));
|
||||
pa_log("WARNING: %s is not trapped. This might cause malfunction!", pa_strsignal(sig));
|
||||
#else /* HAVE_SIGACTION */
|
||||
pa_log(__FILE__": WARNING: %s might not be trapped. This might cause malfunction!", pa_strsignal(sig));
|
||||
pa_log("WARNING: %s might not be trapped. This might cause malfunction!", pa_strsignal(sig));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -460,9 +460,9 @@ void pa_raise_priority(void) {
|
|||
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
if (setpriority(PRIO_PROCESS, 0, NICE_LEVEL) < 0)
|
||||
pa_log_warn(__FILE__": setpriority(): %s", pa_cstrerror(errno));
|
||||
pa_log_warn("setpriority(): %s", pa_cstrerror(errno));
|
||||
else
|
||||
pa_log_info(__FILE__": Successfully gained nice level %i.", NICE_LEVEL);
|
||||
pa_log_info("Successfully gained nice level %i.", NICE_LEVEL);
|
||||
#endif
|
||||
|
||||
#ifdef _POSIX_PRIORITY_SCHEDULING
|
||||
|
|
@ -470,25 +470,25 @@ void pa_raise_priority(void) {
|
|||
struct sched_param sp;
|
||||
|
||||
if (sched_getparam(0, &sp) < 0) {
|
||||
pa_log(__FILE__": sched_getparam(): %s", pa_cstrerror(errno));
|
||||
pa_log("sched_getparam(): %s", pa_cstrerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
sp.sched_priority = 1;
|
||||
if (sched_setscheduler(0, SCHED_FIFO, &sp) < 0) {
|
||||
pa_log_warn(__FILE__": sched_setscheduler(): %s", pa_cstrerror(errno));
|
||||
pa_log_warn("sched_setscheduler(): %s", pa_cstrerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
pa_log_info(__FILE__": Successfully enabled SCHED_FIFO scheduling.");
|
||||
pa_log_info("Successfully enabled SCHED_FIFO scheduling.");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OS_IS_WIN32
|
||||
if (!SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS))
|
||||
pa_log_warn(__FILE__": SetPriorityClass() failed: 0x%08X", GetLastError());
|
||||
pa_log_warn("SetPriorityClass() failed: 0x%08X", GetLastError());
|
||||
else
|
||||
pa_log_info(__FILE__": Successfully gained high priority class.");
|
||||
pa_log_info("Successfully gained high priority class.");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -627,7 +627,7 @@ static int is_group(gid_t gid, const char *name) {
|
|||
data = pa_xmalloc(n);
|
||||
|
||||
if (getgrgid_r(gid, &group, data, n, &result) < 0 || !result) {
|
||||
pa_log(__FILE__": getgrgid_r(%u): %s", (unsigned)gid, pa_cstrerror(errno));
|
||||
pa_log("getgrgid_r(%u): %s", (unsigned)gid, pa_cstrerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
@ -639,7 +639,7 @@ finish:
|
|||
/* XXX Not thread-safe, but needed on OSes (e.g. FreeBSD 4.X) that do not
|
||||
* support getgrgid_r. */
|
||||
if ((result = getgrgid(gid)) == NULL) {
|
||||
pa_log(__FILE__": getgrgid(%u): %s", gid, pa_cstrerror(errno));
|
||||
pa_log("getgrgid(%u): %s", gid, pa_cstrerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
@ -662,7 +662,7 @@ int pa_own_uid_in_group(const char *name, gid_t *gid) {
|
|||
gids = pa_xmalloc(sizeof(GETGROUPS_T)*n);
|
||||
|
||||
if ((n = getgroups(n, gids)) < 0) {
|
||||
pa_log(__FILE__": getgroups(): %s", pa_cstrerror(errno));
|
||||
pa_log("getgroups(): %s", pa_cstrerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
@ -803,7 +803,7 @@ int pa_lock_fd(int fd, int b) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
pa_log(__FILE__": %slock: %s", !b? "un" : "",
|
||||
pa_log("%slock: %s", !b? "un" : "",
|
||||
pa_cstrerror(errno));
|
||||
#endif
|
||||
|
||||
|
|
@ -815,7 +815,7 @@ int pa_lock_fd(int fd, int b) {
|
|||
if (!b && UnlockFile(h, 0, 0, 0xFFFFFFFF, 0xFFFFFFFF))
|
||||
return 0;
|
||||
|
||||
pa_log(__FILE__": %slock failed: 0x%08X", !b ? "un" : "", GetLastError());
|
||||
pa_log("%slock failed: 0x%08X", !b ? "un" : "", GetLastError());
|
||||
#endif
|
||||
|
||||
return -1;
|
||||
|
|
@ -838,18 +838,18 @@ int pa_lock_lockfile(const char *fn) {
|
|||
struct stat st;
|
||||
|
||||
if ((fd = open(fn, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR)) < 0) {
|
||||
pa_log(__FILE__": failed to create lock file '%s': %s", fn,
|
||||
pa_log("failed to create lock file '%s': %s", fn,
|
||||
pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (pa_lock_fd(fd, 1) < 0) {
|
||||
pa_log(__FILE__": failed to lock file '%s'.", fn);
|
||||
pa_log("failed to lock file '%s'.", fn);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (fstat(fd, &st) < 0) {
|
||||
pa_log(__FILE__": failed to fstat() file '%s'.", fn);
|
||||
pa_log("failed to fstat() file '%s'.", fn);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -858,12 +858,12 @@ int pa_lock_lockfile(const char *fn) {
|
|||
break;
|
||||
|
||||
if (pa_lock_fd(fd, 0) < 0) {
|
||||
pa_log(__FILE__": failed to unlock file '%s'.", fn);
|
||||
pa_log("failed to unlock file '%s'.", fn);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (close(fd) < 0) {
|
||||
pa_log(__FILE__": failed to close file '%s'.", fn);
|
||||
pa_log("failed to close file '%s'.", fn);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -886,18 +886,18 @@ int pa_unlock_lockfile(const char *fn, int fd) {
|
|||
assert(fn && fd >= 0);
|
||||
|
||||
if (unlink(fn) < 0) {
|
||||
pa_log_warn(__FILE__": WARNING: unable to remove lock file '%s': %s",
|
||||
pa_log_warn("WARNING: unable to remove lock file '%s': %s",
|
||||
fn, pa_cstrerror(errno));
|
||||
r = -1;
|
||||
}
|
||||
|
||||
if (pa_lock_fd(fd, 0) < 0) {
|
||||
pa_log_warn(__FILE__": WARNING: failed to unlock file '%s'.", fn);
|
||||
pa_log_warn("WARNING: failed to unlock file '%s'.", fn);
|
||||
r = -1;
|
||||
}
|
||||
|
||||
if (close(fd) < 0) {
|
||||
pa_log_warn(__FILE__": WARNING: failed to close lock file '%s': %s",
|
||||
pa_log_warn("WARNING: failed to close lock file '%s': %s",
|
||||
fn, pa_cstrerror(errno));
|
||||
r = -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ static int do_read(pa_ioline *l) {
|
|||
/* Read some data */
|
||||
if ((r = pa_iochannel_read(l->io, l->rbuf+l->rbuf_index+l->rbuf_valid_length, len)) <= 0) {
|
||||
if (r < 0) {
|
||||
pa_log(__FILE__": read(): %s", pa_cstrerror(errno));
|
||||
pa_log("read(): %s", pa_cstrerror(errno));
|
||||
failure(l, 0);
|
||||
} else
|
||||
failure(l, 1);
|
||||
|
|
@ -317,7 +317,7 @@ static int do_write(pa_ioline *l) {
|
|||
while (!l->dead && pa_iochannel_is_writable(l->io) && l->wbuf_valid_length) {
|
||||
|
||||
if ((r = pa_iochannel_write(l->io, l->wbuf+l->wbuf_index, l->wbuf_valid_length)) < 0) {
|
||||
pa_log(__FILE__": write(): %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
pa_log("write(): %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
failure(l, 0);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ pa_ip_acl* pa_ip_acl_new(const char *s) {
|
|||
*slash = 0;
|
||||
slash++;
|
||||
if (pa_atou(slash, &bits) < 0) {
|
||||
pa_log(__FILE__": failed to parse number of bits: %s", slash);
|
||||
pa_log("failed to parse number of bits: %s", slash);
|
||||
goto fail;
|
||||
}
|
||||
} else
|
||||
|
|
@ -99,21 +99,21 @@ pa_ip_acl* pa_ip_acl_new(const char *s) {
|
|||
e.bits = bits == (uint32_t) -1 ? 32 : (int) bits;
|
||||
|
||||
if (e.bits > 32) {
|
||||
pa_log(__FILE__": number of bits out of range: %i", e.bits);
|
||||
pa_log("number of bits out of range: %i", e.bits);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
e.family = AF_INET;
|
||||
|
||||
if (e.bits < 32 && (uint32_t) (ntohl(e.address_ipv4.s_addr) << e.bits) != 0)
|
||||
pa_log_warn(__FILE__": WARNING: Host part of ACL entry '%s/%u' is not zero!", a, e.bits);
|
||||
pa_log_warn("WARNING: Host part of ACL entry '%s/%u' is not zero!", a, e.bits);
|
||||
|
||||
} else if (inet_pton(AF_INET6, a, &e.address_ipv6) > 0) {
|
||||
|
||||
e.bits = bits == (uint32_t) -1 ? 128 : (int) bits;
|
||||
|
||||
if (e.bits > 128) {
|
||||
pa_log(__FILE__": number of bits out of range: %i", e.bits);
|
||||
pa_log("number of bits out of range: %i", e.bits);
|
||||
goto fail;
|
||||
}
|
||||
e.family = AF_INET6;
|
||||
|
|
@ -135,11 +135,11 @@ pa_ip_acl* pa_ip_acl_new(const char *s) {
|
|||
}
|
||||
|
||||
if (t)
|
||||
pa_log_warn(__FILE__": WARNING: Host part of ACL entry '%s/%u' is not zero!", a, e.bits);
|
||||
pa_log_warn("WARNING: Host part of ACL entry '%s/%u' is not zero!", a, e.bits);
|
||||
}
|
||||
|
||||
} else {
|
||||
pa_log(__FILE__": failed to parse address: %s", a);
|
||||
pa_log("failed to parse address: %s", a);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ static struct mempool_slot* mempool_allocate_slot(pa_mempool *p) {
|
|||
} else if (p->n_init < p->n_blocks)
|
||||
slot = (struct mempool_slot*) ((uint8_t*) p->memory.ptr + (p->block_size * p->n_init++));
|
||||
else {
|
||||
pa_log_debug(__FILE__": Pool full");
|
||||
pa_log_debug("Pool full");
|
||||
p->stat.n_pool_full++;
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -241,7 +241,7 @@ pa_memblock *pa_memblock_new_pool(pa_mempool *p, size_t length) {
|
|||
b->type = PA_MEMBLOCK_POOL_EXTERNAL;
|
||||
b->data = mempool_slot_data(slot);
|
||||
} else {
|
||||
pa_log_debug(__FILE__": Memory block to large for pool: %u > %u", length, p->block_size - sizeof(struct mempool_slot));
|
||||
pa_log_debug("Memory block to large for pool: %u > %u", length, p->block_size - sizeof(struct mempool_slot));
|
||||
p->stat.n_too_large_for_pool++;
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -464,7 +464,7 @@ void pa_mempool_free(pa_mempool *p) {
|
|||
pa_memexport_free(p->exports);
|
||||
|
||||
if (p->stat.n_allocated > 0)
|
||||
pa_log_warn(__FILE__": WARNING! Memory pool destroyed but not all memory blocks freed!");
|
||||
pa_log_warn("WARNING! Memory pool destroyed but not all memory blocks freed!");
|
||||
|
||||
pa_shm_free(&p->memory);
|
||||
pa_xfree(p);
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ pa_memblockq* pa_memblockq_new(
|
|||
bq->base = base;
|
||||
bq->read_index = bq->write_index = idx;
|
||||
|
||||
pa_log_debug(__FILE__": memblockq requested: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu",
|
||||
pa_log_debug("memblockq requested: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu",
|
||||
(unsigned long)maxlength, (unsigned long)tlength, (unsigned long)base, (unsigned long)prebuf, (unsigned long)minreq);
|
||||
|
||||
bq->maxlength = ((maxlength+base-1)/base)*base;
|
||||
|
|
@ -97,7 +97,7 @@ pa_memblockq* pa_memblockq_new(
|
|||
if (!bq->minreq)
|
||||
bq->minreq = 1;
|
||||
|
||||
pa_log_debug(__FILE__": memblockq sanitized: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu",
|
||||
pa_log_debug("memblockq sanitized: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu",
|
||||
(unsigned long)bq->maxlength, (unsigned long)bq->tlength, (unsigned long)bq->base, (unsigned long)bq->prebuf, (unsigned long)bq->minreq);
|
||||
|
||||
bq->state = bq->prebuf ? PREBUF : RUNNING;
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ pa_modinfo *pa_modinfo_get_by_name(const char *name) {
|
|||
assert(name);
|
||||
|
||||
if (!(dl = lt_dlopenext(name))) {
|
||||
pa_log(__FILE__": Failed to open module \"%s\": %s", name, lt_dlerror());
|
||||
pa_log("Failed to open module \"%s\": %s", name, lt_dlerror());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,17 +112,17 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
|
|||
m->argument = pa_xstrdup(argument);
|
||||
|
||||
if (!(m->dl = lt_dlopenext(name))) {
|
||||
pa_log(__FILE__": Failed to open module \"%s\": %s", name, lt_dlerror());
|
||||
pa_log("Failed to open module \"%s\": %s", name, lt_dlerror());
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!(m->init = (int (*)(pa_core *_c, pa_module*_m)) load_sym(m->dl, name, PA_SYMBOL_INIT))) {
|
||||
pa_log(__FILE__": Failed to load module \"%s\": symbol \""PA_SYMBOL_INIT"\" not found.", name);
|
||||
pa_log("Failed to load module \"%s\": symbol \""PA_SYMBOL_INIT"\" not found.", name);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!(m->done = (void (*)(pa_core *_c, pa_module*_m)) load_sym(m->dl, name, PA_SYMBOL_DONE))) {
|
||||
pa_log(__FILE__": Failed to load module \"%s\": symbol \""PA_SYMBOL_DONE"\" not found.", name);
|
||||
pa_log("Failed to load module \"%s\": symbol \""PA_SYMBOL_DONE"\" not found.", name);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
|
|||
|
||||
assert(m->init);
|
||||
if (m->init(c, m) < 0) {
|
||||
pa_log_error(__FILE__": Failed to load module \"%s\" (argument: \"%s\"): initialization failed.", name, argument ? argument : "");
|
||||
pa_log_error("Failed to load module \"%s\" (argument: \"%s\"): initialization failed.", name, argument ? argument : "");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
|
|||
r = pa_idxset_put(c->modules, m, &m->index);
|
||||
assert(r >= 0 && m->index != PA_IDXSET_INVALID);
|
||||
|
||||
pa_log_info(__FILE__": Loaded \"%s\" (index: #%u; argument: \"%s\").", m->name, m->index, m->argument ? m->argument : "");
|
||||
pa_log_info("Loaded \"%s\" (index: #%u; argument: \"%s\").", m->name, m->index, m->argument ? m->argument : "");
|
||||
|
||||
pa_subscription_post(c, PA_SUBSCRIPTION_EVENT_MODULE|PA_SUBSCRIPTION_EVENT_NEW, m->index);
|
||||
|
||||
|
|
@ -180,13 +180,13 @@ static void pa_module_free(pa_module *m) {
|
|||
if (m->core->disallow_module_loading)
|
||||
return;
|
||||
|
||||
pa_log_info(__FILE__": Unloading \"%s\" (index: #%u).", m->name, m->index);
|
||||
pa_log_info("Unloading \"%s\" (index: #%u).", m->name, m->index);
|
||||
|
||||
m->done(m->core, m);
|
||||
|
||||
lt_dlclose(m->dl);
|
||||
|
||||
pa_log_info(__FILE__": Unloaded \"%s\" (index: #%u).", m->name, m->index);
|
||||
pa_log_info("Unloaded \"%s\" (index: #%u).", m->name, m->index);
|
||||
|
||||
pa_subscription_post(m->core, PA_SUBSCRIPTION_EVENT_MODULE|PA_SUBSCRIPTION_EVENT_REMOVE, m->index);
|
||||
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*packet, const pa_creds *creds,
|
|||
if (!(p = command_names[command]))
|
||||
snprintf((char*) (p = t), sizeof(t), "%u", command);
|
||||
|
||||
pa_log(__FILE__": Recieved opcode <%s>", p);
|
||||
pa_log("Recieved opcode <%s>", p);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -226,7 +226,7 @@ int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*packet, const pa_creds *creds,
|
|||
|
||||
(*c)(pd, command, tag, ts, userdata);
|
||||
} else {
|
||||
pa_log(__FILE__": Recieved unsupported command %u", command);
|
||||
pa_log("Recieved unsupported command %u", command);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ static pid_t read_pid(const char *fn, int fd) {
|
|||
assert(fn && fd >= 0);
|
||||
|
||||
if ((r = pa_loop_read(fd, t, sizeof(t)-1, NULL)) < 0) {
|
||||
pa_log_warn(__FILE__": WARNING: failed to read PID file '%s': %s",
|
||||
pa_log_warn("WARNING: failed to read PID file '%s': %s",
|
||||
fn, pa_cstrerror(errno));
|
||||
return (pid_t) -1;
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ static pid_t read_pid(const char *fn, int fd) {
|
|||
*e = 0;
|
||||
|
||||
if (pa_atou(t, &pid) < 0) {
|
||||
pa_log(__FILE__": WARNING: failed to parse PID file '%s'", fn);
|
||||
pa_log("WARNING: failed to parse PID file '%s'", fn);
|
||||
return (pid_t) -1;
|
||||
}
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ static int open_pid_file(const char *fn, int mode) {
|
|||
|
||||
if ((fd = open(fn, mode, S_IRUSR|S_IWUSR)) < 0) {
|
||||
if (mode != O_RDONLY || errno != ENOENT)
|
||||
pa_log_warn(__FILE__": WARNING: failed to open PID file '%s': %s",
|
||||
pa_log_warn("WARNING: failed to open PID file '%s': %s",
|
||||
fn, pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ static int open_pid_file(const char *fn, int mode) {
|
|||
goto fail;
|
||||
|
||||
if (fstat(fd, &st) < 0) {
|
||||
pa_log_warn(__FILE__": WARNING: failed to fstat() PID file '%s': %s",
|
||||
pa_log_warn("WARNING: failed to fstat() PID file '%s': %s",
|
||||
fn, pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -108,7 +108,7 @@ static int open_pid_file(const char *fn, int mode) {
|
|||
goto fail;
|
||||
|
||||
if (close(fd) < 0) {
|
||||
pa_log_warn(__FILE__": WARNING: failed to close file '%s': %s",
|
||||
pa_log_warn("WARNING: failed to close file '%s': %s",
|
||||
fn, pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ int pa_pid_file_create(void) {
|
|||
goto fail;
|
||||
|
||||
if ((pid = read_pid(fn, fd)) == (pid_t) -1)
|
||||
pa_log(__FILE__": corrupt PID file, overwriting.");
|
||||
pa_log("corrupt PID file, overwriting.");
|
||||
else if (pid > 0) {
|
||||
#ifdef OS_IS_WIN32
|
||||
if ((process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid)) != NULL) {
|
||||
|
|
@ -155,16 +155,16 @@ int pa_pid_file_create(void) {
|
|||
#else
|
||||
if (kill(pid, 0) >= 0 || errno != ESRCH) {
|
||||
#endif
|
||||
pa_log(__FILE__": daemon already running.");
|
||||
pa_log("daemon already running.");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
pa_log(__FILE__": stale PID file, overwriting.");
|
||||
pa_log("stale PID file, overwriting.");
|
||||
}
|
||||
|
||||
/* Overwrite the current PID file */
|
||||
if (lseek(fd, 0, SEEK_SET) == (off_t) -1 || ftruncate(fd, 0) < 0) {
|
||||
pa_log(__FILE__": failed to truncate PID file '%s': %s",
|
||||
pa_log("failed to truncate PID file '%s': %s",
|
||||
fn, pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ int pa_pid_file_create(void) {
|
|||
l = strlen(t);
|
||||
|
||||
if (pa_loop_write(fd, t, l, NULL) != (ssize_t) l) {
|
||||
pa_log(__FILE__": failed to write PID file.");
|
||||
pa_log("failed to write PID file.");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ int pa_pid_file_remove(void) {
|
|||
pa_runtime_path("pid", fn, sizeof(fn));
|
||||
|
||||
if ((fd = open_pid_file(fn, O_RDWR)) < 0) {
|
||||
pa_log_warn(__FILE__": WARNING: failed to open PID file '%s': %s",
|
||||
pa_log_warn("WARNING: failed to open PID file '%s': %s",
|
||||
fn, pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -207,12 +207,12 @@ int pa_pid_file_remove(void) {
|
|||
goto fail;
|
||||
|
||||
if (pid != getpid()) {
|
||||
pa_log(__FILE__": WARNING: PID file '%s' not mine!", fn);
|
||||
pa_log("WARNING: PID file '%s' not mine!", fn);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (ftruncate(fd, 0) < 0) {
|
||||
pa_log_warn(__FILE__": WARNING: failed to truncate PID file '%s': %s",
|
||||
pa_log_warn("WARNING: failed to truncate PID file '%s': %s",
|
||||
fn, pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -224,7 +224,7 @@ int pa_pid_file_remove(void) {
|
|||
#endif
|
||||
|
||||
if (unlink(fn) < 0) {
|
||||
pa_log_warn(__FILE__": WARNING: failed to remove PID file '%s': %s",
|
||||
pa_log_warn("WARNING: failed to remove PID file '%s': %s",
|
||||
fn, pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
|
|||
assert(s && io && p);
|
||||
|
||||
if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
|
||||
pa_log(__FILE__": Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
|
||||
pa_log("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
|
||||
pa_iochannel_free(io);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ static int esd_proto_connect(struct connection *c, PA_GCC_UNUSED esd_proto_t req
|
|||
|
||||
if (!c->authorized) {
|
||||
if (memcmp(data, c->protocol->esd_key, ESD_KEY_LEN) != 0) {
|
||||
pa_log(__FILE__": kicked client with invalid authorization key.");
|
||||
pa_log("kicked client with invalid authorization key.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -313,7 +313,7 @@ static int esd_proto_connect(struct connection *c, PA_GCC_UNUSED esd_proto_t req
|
|||
else if (ekey == ESD_SWAP_ENDIAN_KEY)
|
||||
c->swap_byte_order = 1;
|
||||
else {
|
||||
pa_log(__FILE__": client sent invalid endian key");
|
||||
pa_log("client sent invalid endian key");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -421,19 +421,19 @@ static int esd_proto_stream_record(struct connection *c, esd_proto_t request, co
|
|||
pa_sink* sink;
|
||||
|
||||
if (!(sink = pa_namereg_get(c->protocol->core, c->protocol->sink_name, PA_NAMEREG_SINK, 1))) {
|
||||
pa_log(__FILE__": no such sink.");
|
||||
pa_log("no such sink.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(source = sink->monitor_source)) {
|
||||
pa_log(__FILE__": no such monitor source.");
|
||||
pa_log("no such monitor source.");
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
assert(request == ESD_PROTO_STREAM_REC);
|
||||
|
||||
if (!(source = pa_namereg_get(c->protocol->core, c->protocol->source_name, PA_NAMEREG_SOURCE, 1))) {
|
||||
pa_log(__FILE__": no such source.");
|
||||
pa_log("no such source.");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
@ -822,7 +822,7 @@ static int do_read(struct connection *c) {
|
|||
assert(c->read_data_length < sizeof(c->request));
|
||||
|
||||
if ((r = pa_iochannel_read(c->io, ((uint8_t*) &c->request) + c->read_data_length, sizeof(c->request) - c->read_data_length)) <= 0) {
|
||||
pa_log_debug(__FILE__": read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
pa_log_debug("read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -832,16 +832,16 @@ static int do_read(struct connection *c) {
|
|||
c->request = MAYBE_INT32_SWAP(c->swap_byte_order, c->request);
|
||||
|
||||
if (c->request < ESD_PROTO_CONNECT || c->request > ESD_PROTO_MAX) {
|
||||
pa_log(__FILE__": recieved invalid request.");
|
||||
pa_log("recieved invalid request.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
handler = proto_map+c->request;
|
||||
|
||||
/* pa_log(__FILE__": executing request #%u", c->request); */
|
||||
/* pa_log("executing request #%u", c->request); */
|
||||
|
||||
if (!handler->proc) {
|
||||
pa_log(__FILE__": recieved unimplemented request #%u.", c->request);
|
||||
pa_log("recieved unimplemented request #%u.", c->request);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -870,7 +870,7 @@ static int do_read(struct connection *c) {
|
|||
assert(c->read_data && c->read_data_length < handler->data_length);
|
||||
|
||||
if ((r = pa_iochannel_read(c->io, (uint8_t*) c->read_data + c->read_data_length, handler->data_length - c->read_data_length)) <= 0) {
|
||||
pa_log_debug(__FILE__": read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
pa_log_debug("read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -890,7 +890,7 @@ static int do_read(struct connection *c) {
|
|||
assert(c->scache.memchunk.memblock && c->scache.name && c->scache.memchunk.index < c->scache.memchunk.length);
|
||||
|
||||
if ((r = pa_iochannel_read(c->io, (uint8_t*) c->scache.memchunk.memblock->data+c->scache.memchunk.index, c->scache.memchunk.length-c->scache.memchunk.index)) <= 0) {
|
||||
pa_log_debug(__FILE__": read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
pa_log_debug("read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -945,7 +945,7 @@ static int do_read(struct connection *c) {
|
|||
}
|
||||
|
||||
if ((r = pa_iochannel_read(c->io, (uint8_t*) c->playback.current_memblock->data+c->playback.memblock_index, l)) <= 0) {
|
||||
pa_log_debug(__FILE__": read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
pa_log_debug("read(): %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -975,7 +975,7 @@ static int do_write(struct connection *c) {
|
|||
|
||||
assert(c->write_data_index < c->write_data_length);
|
||||
if ((r = pa_iochannel_write(c->io, (uint8_t*) c->write_data+c->write_data_index, c->write_data_length-c->write_data_index)) < 0) {
|
||||
pa_log(__FILE__": write(): %s", pa_cstrerror(errno));
|
||||
pa_log("write(): %s", pa_cstrerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -994,7 +994,7 @@ static int do_write(struct connection *c) {
|
|||
|
||||
if ((r = pa_iochannel_write(c->io, (uint8_t*) chunk.memblock->data+chunk.index, chunk.length)) < 0) {
|
||||
pa_memblock_unref(chunk.memblock);
|
||||
pa_log(__FILE__": write(): %s", pa_cstrerror(errno));
|
||||
pa_log("write(): %s", pa_cstrerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -1154,7 +1154,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
|
|||
assert(s && io && p);
|
||||
|
||||
if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
|
||||
pa_log(__FILE__": Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
|
||||
pa_log("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
|
||||
pa_iochannel_free(io);
|
||||
return;
|
||||
}
|
||||
|
|
@ -1203,7 +1203,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
|
|||
c->original_name = NULL;
|
||||
|
||||
if (!c->authorized && p->auth_ip_acl && pa_ip_acl_check(p->auth_ip_acl, pa_iochannel_get_recv_fd(io)) > 0) {
|
||||
pa_log_info(__FILE__": Client authenticated by IP ACL.");
|
||||
pa_log_info("Client authenticated by IP ACL.");
|
||||
c->authorized = 1;
|
||||
}
|
||||
|
||||
|
|
@ -1237,7 +1237,7 @@ pa_protocol_esound* pa_protocol_esound_new(pa_core*core, pa_socket_server *serve
|
|||
p = pa_xnew(pa_protocol_esound, 1);
|
||||
|
||||
if (pa_modargs_get_value_boolean(ma, "auth-anonymous", &public) < 0) {
|
||||
pa_log(__FILE__": auth-anonymous= expects a boolean argument.");
|
||||
pa_log("auth-anonymous= expects a boolean argument.");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -1247,7 +1247,7 @@ pa_protocol_esound* pa_protocol_esound_new(pa_core*core, pa_socket_server *serve
|
|||
if ((acl = pa_modargs_get_value(ma, "auth-ip-acl", NULL))) {
|
||||
|
||||
if (!(p->auth_ip_acl = pa_ip_acl_new(acl))) {
|
||||
pa_log(__FILE__": Failed to parse IP ACL '%s'", acl);
|
||||
pa_log("Failed to parse IP ACL '%s'", acl);
|
||||
goto fail;
|
||||
}
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
|
|||
/* We're done */
|
||||
c->state = DATA;
|
||||
|
||||
pa_log_info(__FILE__": request for %s", c->url);
|
||||
pa_log_info("request for %s", c->url);
|
||||
|
||||
if (!strcmp(c->url, URL_ROOT)) {
|
||||
char txt[256];
|
||||
|
|
@ -224,7 +224,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
|
|||
assert(s && io && p);
|
||||
|
||||
if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
|
||||
pa_log_warn(__FILE__": Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
|
||||
pa_log_warn("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
|
||||
pa_iochannel_free(io);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -542,7 +542,7 @@ static void request_bytes(struct playback_stream *s) {
|
|||
pa_tagstruct_putu32(t, l);
|
||||
pa_pstream_send_tagstruct(s->connection->pstream, t);
|
||||
|
||||
/* pa_log(__FILE__": Requesting %u bytes", l); */
|
||||
/* pa_log("Requesting %u bytes", l); */
|
||||
}
|
||||
|
||||
static void send_memblock(struct connection *c) {
|
||||
|
|
@ -620,11 +620,11 @@ static int sink_input_peek_cb(pa_sink_input *i, pa_memchunk *chunk) {
|
|||
}
|
||||
|
||||
if (pa_memblockq_peek(s->memblockq, chunk) < 0) {
|
||||
/* pa_log(__FILE__": peek: failure"); */
|
||||
/* pa_log("peek: failure"); */
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* pa_log(__FILE__": peek: %u", chunk->length); */
|
||||
/* pa_log("peek: %u", chunk->length); */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -643,7 +643,7 @@ static void sink_input_drop_cb(pa_sink_input *i, const pa_memchunk *chunk, size_
|
|||
s->drain_request = 0;
|
||||
}
|
||||
|
||||
/* pa_log(__FILE__": after_drop: %u %u", pa_memblockq_get_length(s->memblockq), pa_memblockq_is_readable(s->memblockq)); */
|
||||
/* pa_log("after_drop: %u %u", pa_memblockq_get_length(s->memblockq), pa_memblockq_is_readable(s->memblockq)); */
|
||||
}
|
||||
|
||||
static void sink_input_kill_cb(pa_sink_input *i) {
|
||||
|
|
@ -657,7 +657,7 @@ static pa_usec_t sink_input_get_latency_cb(pa_sink_input *i) {
|
|||
assert(i && i->userdata);
|
||||
s = i->userdata;
|
||||
|
||||
/*pa_log(__FILE__": get_latency: %u", pa_memblockq_get_length(s->memblockq));*/
|
||||
/*pa_log("get_latency: %u", pa_memblockq_get_length(s->memblockq));*/
|
||||
|
||||
return pa_bytes_to_usec(pa_memblockq_get_length(s->memblockq), &s->sink_input->sample_spec);
|
||||
}
|
||||
|
|
@ -670,7 +670,7 @@ static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk)
|
|||
s = o->userdata;
|
||||
|
||||
if (pa_memblockq_push_align(s->memblockq, chunk) < 0) {
|
||||
pa_log_warn(__FILE__": Failed to push data into output queue.");
|
||||
pa_log_warn("Failed to push data into output queue.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -689,7 +689,7 @@ static pa_usec_t source_output_get_latency_cb(pa_source_output *o) {
|
|||
assert(o && o->userdata);
|
||||
s = o->userdata;
|
||||
|
||||
/*pa_log(__FILE__": get_latency: %u", pa_memblockq_get_length(s->memblockq));*/
|
||||
/*pa_log("get_latency: %u", pa_memblockq_get_length(s->memblockq));*/
|
||||
|
||||
return pa_bytes_to_usec(pa_memblockq_get_length(s->memblockq), &o->sample_spec);
|
||||
}
|
||||
|
|
@ -697,7 +697,7 @@ static pa_usec_t source_output_get_latency_cb(pa_source_output *o) {
|
|||
/*** pdispatch callbacks ***/
|
||||
|
||||
static void protocol_error(struct connection *c) {
|
||||
pa_log(__FILE__": protocol error, kicking client");
|
||||
pa_log("protocol error, kicking client");
|
||||
connection_free(c);
|
||||
}
|
||||
|
||||
|
|
@ -945,19 +945,19 @@ static void command_auth(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t
|
|||
gid_t gid;
|
||||
|
||||
if ((gid = pa_get_gid_of_group(c->protocol->auth_group)) == (gid_t) -1)
|
||||
pa_log_warn(__FILE__": failed to get GID of group '%s'", c->protocol->auth_group);
|
||||
pa_log_warn("failed to get GID of group '%s'", c->protocol->auth_group);
|
||||
else if (gid == creds->gid)
|
||||
success = 1;
|
||||
|
||||
if (!success) {
|
||||
if ((r = pa_uid_in_group(creds->uid, c->protocol->auth_group)) < 0)
|
||||
pa_log_warn(__FILE__": failed to check group membership.");
|
||||
pa_log_warn("failed to check group membership.");
|
||||
else if (r > 0)
|
||||
success = 1;
|
||||
}
|
||||
}
|
||||
|
||||
pa_log_info(__FILE__": Got credentials: uid=%lu gid=%lu success=%i",
|
||||
pa_log_info("Got credentials: uid=%lu gid=%lu success=%i",
|
||||
(unsigned long) creds->uid,
|
||||
(unsigned long) creds->gid,
|
||||
success);
|
||||
|
|
@ -968,7 +968,7 @@ static void command_auth(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t
|
|||
success = 1;
|
||||
|
||||
if (!success) {
|
||||
pa_log_warn(__FILE__": Denied access to client with invalid authorization data.");
|
||||
pa_log_warn("Denied access to client with invalid authorization data.");
|
||||
pa_pstream_send_error(c->pstream, tag, PA_ERR_ACCESS);
|
||||
return;
|
||||
}
|
||||
|
|
@ -2199,7 +2199,7 @@ static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_c
|
|||
assert(p && packet && packet->data && c);
|
||||
|
||||
if (pa_pdispatch_run(c->pdispatch, packet, creds, c) < 0) {
|
||||
pa_log(__FILE__": invalid packet.");
|
||||
pa_log("invalid packet.");
|
||||
connection_free(c);
|
||||
}
|
||||
}
|
||||
|
|
@ -2210,7 +2210,7 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o
|
|||
assert(p && chunk && userdata);
|
||||
|
||||
if (!(stream = pa_idxset_get_by_index(c->output_streams, channel))) {
|
||||
pa_log(__FILE__": client sent block for invalid stream.");
|
||||
pa_log("client sent block for invalid stream.");
|
||||
/* Ignoring */
|
||||
return;
|
||||
}
|
||||
|
|
@ -2227,7 +2227,7 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o
|
|||
if (pa_memblockq_push_align(ps->memblockq, chunk) < 0) {
|
||||
pa_tagstruct *t;
|
||||
|
||||
pa_log_warn(__FILE__": failed to push data into queue");
|
||||
pa_log_warn("failed to push data into queue");
|
||||
|
||||
/* Pushing this block into the queue failed, so we simulate
|
||||
* it by skipping ahead */
|
||||
|
|
@ -2282,7 +2282,7 @@ static void pstream_die_callback(pa_pstream *p, void *userdata) {
|
|||
assert(p && c);
|
||||
connection_free(c);
|
||||
|
||||
/* pa_log(__FILE__": connection died.");*/
|
||||
/* pa_log("connection died.");*/
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2317,7 +2317,7 @@ static void on_connection(PA_GCC_UNUSED pa_socket_server*s, pa_iochannel *io, vo
|
|||
assert(io && p);
|
||||
|
||||
if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
|
||||
pa_log_warn(__FILE__": Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
|
||||
pa_log_warn("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
|
||||
pa_iochannel_free(io);
|
||||
return;
|
||||
}
|
||||
|
|
@ -2327,7 +2327,7 @@ static void on_connection(PA_GCC_UNUSED pa_socket_server*s, pa_iochannel *io, vo
|
|||
c->authorized = !!p->public;
|
||||
|
||||
if (!c->authorized && p->auth_ip_acl && pa_ip_acl_check(p->auth_ip_acl, pa_iochannel_get_recv_fd(io)) > 0) {
|
||||
pa_log_info(__FILE__": Client authenticated by IP ACL.");
|
||||
pa_log_info("Client authenticated by IP ACL.");
|
||||
c->authorized = 1;
|
||||
}
|
||||
|
||||
|
|
@ -2388,7 +2388,7 @@ static int load_key(pa_protocol_native*p, const char*fn) {
|
|||
p->auth_cookie_in_property = 0;
|
||||
|
||||
if (!fn && pa_authkey_prop_get(p->core, PA_NATIVE_COOKIE_PROPERTY_NAME, p->auth_cookie, sizeof(p->auth_cookie)) >= 0) {
|
||||
pa_log_info(__FILE__": using already loaded auth cookie.");
|
||||
pa_log_info("using already loaded auth cookie.");
|
||||
pa_authkey_prop_ref(p->core, PA_NATIVE_COOKIE_PROPERTY_NAME);
|
||||
p->auth_cookie_in_property = 1;
|
||||
return 0;
|
||||
|
|
@ -2400,7 +2400,7 @@ static int load_key(pa_protocol_native*p, const char*fn) {
|
|||
if (pa_authkey_load_auto(fn, p->auth_cookie, sizeof(p->auth_cookie)) < 0)
|
||||
return -1;
|
||||
|
||||
pa_log_info(__FILE__": loading cookie from disk.");
|
||||
pa_log_info("loading cookie from disk.");
|
||||
|
||||
if (pa_authkey_prop_put(p->core, PA_NATIVE_COOKIE_PROPERTY_NAME, p->auth_cookie, sizeof(p->auth_cookie)) >= 0)
|
||||
p->auth_cookie_in_property = 1;
|
||||
|
|
@ -2417,7 +2417,7 @@ static pa_protocol_native* protocol_new_internal(pa_core *c, pa_module *m, pa_mo
|
|||
assert(ma);
|
||||
|
||||
if (pa_modargs_get_value_boolean(ma, "auth-anonymous", &public) < 0) {
|
||||
pa_log(__FILE__": auth-anonymous= expects a boolean argument.");
|
||||
pa_log("auth-anonymous= expects a boolean argument.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -2432,13 +2432,13 @@ static pa_protocol_native* protocol_new_internal(pa_core *c, pa_module *m, pa_mo
|
|||
{
|
||||
int a = 1;
|
||||
if (pa_modargs_get_value_boolean(ma, "auth-group-enabled", &a) < 0) {
|
||||
pa_log(__FILE__": auth-group-enabled= expects a boolean argument.");
|
||||
pa_log("auth-group-enabled= expects a boolean argument.");
|
||||
return NULL;
|
||||
}
|
||||
p->auth_group = a ? pa_xstrdup(pa_modargs_get_value(ma, "auth-group", c->is_system_instance ? PA_ACCESS_GROUP : NULL)) : NULL;
|
||||
|
||||
if (p->auth_group)
|
||||
pa_log_info(__FILE__": Allowing access to group '%s'.", p->auth_group);
|
||||
pa_log_info("Allowing access to group '%s'.", p->auth_group);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -2446,7 +2446,7 @@ static pa_protocol_native* protocol_new_internal(pa_core *c, pa_module *m, pa_mo
|
|||
if ((acl = pa_modargs_get_value(ma, "auth-ip-acl", NULL))) {
|
||||
|
||||
if (!(p->auth_ip_acl = pa_ip_acl_new(acl))) {
|
||||
pa_log(__FILE__": Failed to parse IP ACL '%s'", acl);
|
||||
pa_log("Failed to parse IP ACL '%s'", acl);
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ static int do_read(struct connection *c) {
|
|||
}
|
||||
|
||||
if ((r = pa_iochannel_read(c->io, (uint8_t*) c->playback.current_memblock->data+c->playback.memblock_index, l)) <= 0) {
|
||||
pa_log_debug(__FILE__": read(): %s", r == 0 ? "EOF" : pa_cstrerror(errno));
|
||||
pa_log_debug("read(): %s", r == 0 ? "EOF" : pa_cstrerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ static int do_write(struct connection *c) {
|
|||
|
||||
if ((r = pa_iochannel_write(c->io, (uint8_t*) chunk.memblock->data+chunk.index, chunk.length)) < 0) {
|
||||
pa_memblock_unref(chunk.memblock);
|
||||
pa_log(__FILE__": write(): %s", pa_cstrerror(errno));
|
||||
pa_log("write(): %s", pa_cstrerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -315,7 +315,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
|
|||
assert(s && io && p);
|
||||
|
||||
if (pa_idxset_size(p->connections)+1 > MAX_CONNECTIONS) {
|
||||
pa_log(__FILE__": Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
|
||||
pa_log("Warning! Too many connections (%u), dropping incoming connection.", MAX_CONNECTIONS);
|
||||
pa_iochannel_free(io);
|
||||
return;
|
||||
}
|
||||
|
|
@ -351,7 +351,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
|
|||
data.client = c->client;
|
||||
|
||||
if (!(c->sink_input = pa_sink_input_new(p->core, &data, 0))) {
|
||||
pa_log(__FILE__": Failed to create sink input.");
|
||||
pa_log("Failed to create sink input.");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ static void on_connection(pa_socket_server*s, pa_iochannel *io, void *userdata)
|
|||
data.client = c->client;
|
||||
|
||||
if (!(c->source_output = pa_source_output_new(p->core, &data, 0))) {
|
||||
pa_log(__FILE__": Failed to create source output.");
|
||||
pa_log("Failed to create source output.");
|
||||
goto fail;
|
||||
}
|
||||
c->source_output->push = source_output_push_cb;
|
||||
|
|
@ -437,7 +437,7 @@ pa_protocol_simple* pa_protocol_simple_new(pa_core *core, pa_socket_server *serv
|
|||
|
||||
p->sample_spec = core->default_sample_spec;
|
||||
if (pa_modargs_get_sample_spec(ma, &p->sample_spec) < 0) {
|
||||
pa_log(__FILE__": Failed to parse sample type specification.");
|
||||
pa_log("Failed to parse sample type specification.");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -446,20 +446,20 @@ pa_protocol_simple* pa_protocol_simple_new(pa_core *core, pa_socket_server *serv
|
|||
|
||||
enable = 0;
|
||||
if (pa_modargs_get_value_boolean(ma, "record", &enable) < 0) {
|
||||
pa_log(__FILE__": record= expects a numeric argument.");
|
||||
pa_log("record= expects a numeric argument.");
|
||||
goto fail;
|
||||
}
|
||||
p->mode = enable ? RECORD : 0;
|
||||
|
||||
enable = 1;
|
||||
if (pa_modargs_get_value_boolean(ma, "playback", &enable) < 0) {
|
||||
pa_log(__FILE__": playback= expects a numeric argument.");
|
||||
pa_log("playback= expects a numeric argument.");
|
||||
goto fail;
|
||||
}
|
||||
p->mode |= enable ? PLAYBACK : 0;
|
||||
|
||||
if ((p->mode & (RECORD|PLAYBACK)) == 0) {
|
||||
pa_log(__FILE__": neither playback nor recording enabled for protocol.");
|
||||
pa_log("neither playback nor recording enabled for protocol.");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ static void memimport_release_cb(pa_memimport *i, uint32_t block_id, void *userd
|
|||
if (p->dead)
|
||||
return;
|
||||
|
||||
/* pa_log(__FILE__": Releasing block %u", block_id); */
|
||||
/* pa_log("Releasing block %u", block_id); */
|
||||
|
||||
item = pa_xnew(struct item_info, 1);
|
||||
item->type = PA_PSTREAM_ITEM_SHMRELEASE;
|
||||
|
|
@ -380,7 +380,7 @@ static void memexport_revoke_cb(pa_memexport *e, uint32_t block_id, void *userda
|
|||
if (p->dead)
|
||||
return;
|
||||
|
||||
/* pa_log(__FILE__": Revoking block %u", block_id); */
|
||||
/* pa_log("Revoking block %u", block_id); */
|
||||
|
||||
item = pa_xnew(struct item_info, 1);
|
||||
item->type = PA_PSTREAM_ITEM_SHMREVOKE;
|
||||
|
|
@ -462,7 +462,7 @@ static void prepare_next_write_item(pa_pstream *p) {
|
|||
p->write.data = p->write.shm_info;
|
||||
}
|
||||
/* else */
|
||||
/* pa_log_warn(__FILE__": Failed to export memory block."); */
|
||||
/* pa_log_warn("Failed to export memory block."); */
|
||||
}
|
||||
|
||||
if (send_payload) {
|
||||
|
|
@ -569,7 +569,7 @@ static int do_read(pa_pstream *p) {
|
|||
flags = ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS]);
|
||||
|
||||
if (!p->use_shm && (flags & PA_FLAG_SHMMASK) != 0) {
|
||||
pa_log_warn(__FILE__": Recieved SHM frame on a socket where SHM is disabled.");
|
||||
pa_log_warn("Recieved SHM frame on a socket where SHM is disabled.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -577,7 +577,7 @@ static int do_read(pa_pstream *p) {
|
|||
|
||||
/* This is a SHM memblock release frame with no payload */
|
||||
|
||||
/* pa_log(__FILE__": Got release frame for %u", ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); */
|
||||
/* pa_log("Got release frame for %u", ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); */
|
||||
|
||||
assert(p->export);
|
||||
pa_memexport_process_release(p->export, ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI]));
|
||||
|
|
@ -588,7 +588,7 @@ static int do_read(pa_pstream *p) {
|
|||
|
||||
/* This is a SHM memblock revoke frame with no payload */
|
||||
|
||||
/* pa_log(__FILE__": Got revoke frame for %u", ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); */
|
||||
/* pa_log("Got revoke frame for %u", ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); */
|
||||
|
||||
assert(p->import);
|
||||
pa_memimport_process_revoke(p->import, ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI]));
|
||||
|
|
@ -599,7 +599,7 @@ static int do_read(pa_pstream *p) {
|
|||
length = ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]);
|
||||
|
||||
if (length > FRAME_SIZE_MAX) {
|
||||
pa_log_warn(__FILE__": Recieved invalid frame size : %lu", (unsigned long) length);
|
||||
pa_log_warn("Recieved invalid frame size : %lu", (unsigned long) length);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -610,7 +610,7 @@ static int do_read(pa_pstream *p) {
|
|||
if (channel == (uint32_t) -1) {
|
||||
|
||||
if (flags != 0) {
|
||||
pa_log_warn(__FILE__": Received packet frame with invalid flags value.");
|
||||
pa_log_warn("Received packet frame with invalid flags value.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -621,14 +621,14 @@ static int do_read(pa_pstream *p) {
|
|||
} else {
|
||||
|
||||
if ((flags & PA_FLAG_SEEKMASK) > PA_SEEK_RELATIVE_END) {
|
||||
pa_log_warn(__FILE__": Received memblock frame with invalid seek mode.");
|
||||
pa_log_warn("Received memblock frame with invalid seek mode.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((flags & PA_FLAG_SHMMASK) == PA_FLAG_SHMDATA) {
|
||||
|
||||
if (length != sizeof(p->read.shm_info)) {
|
||||
pa_log_warn(__FILE__": Recieved SHM memblock frame with Invalid frame length.");
|
||||
pa_log_warn("Recieved SHM memblock frame with Invalid frame length.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -643,7 +643,7 @@ static int do_read(pa_pstream *p) {
|
|||
p->read.data = p->read.memblock->data;
|
||||
} else {
|
||||
|
||||
pa_log_warn(__FILE__": Recieved memblock frame with invalid flags value.");
|
||||
pa_log_warn("Recieved memblock frame with invalid flags value.");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
@ -717,7 +717,7 @@ static int do_read(pa_pstream *p) {
|
|||
ntohl(p->read.shm_info[PA_PSTREAM_SHM_INDEX]),
|
||||
ntohl(p->read.shm_info[PA_PSTREAM_SHM_LENGTH])))) {
|
||||
|
||||
pa_log_warn(__FILE__": Failed to import memory block.");
|
||||
pa_log_warn("Failed to import memory block.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ void pa_random_seed(void) {
|
|||
|
||||
if (random_proper(&seed, sizeof(unsigned int)) < 0) {
|
||||
if (!has_whined)
|
||||
pa_log_warn(__FILE__": failed to get proper entropy. Falling back to seeding with current time.");
|
||||
pa_log_warn("failed to get proper entropy. Falling back to seeding with current time.");
|
||||
has_whined = 1;
|
||||
|
||||
seed = (unsigned int) time(NULL);
|
||||
|
|
@ -100,7 +100,7 @@ void pa_random(void *ret_data, size_t length) {
|
|||
return;
|
||||
|
||||
if (!has_whined)
|
||||
pa_log_warn(__FILE__": failed to get proper entropy. Falling back to unsecure pseudo RNG.");
|
||||
pa_log_warn("failed to get proper entropy. Falling back to unsecure pseudo RNG.");
|
||||
has_whined = 1;
|
||||
|
||||
for (p = ret_data, l = length; l > 0; p++, l--)
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ size_t pa_mix(
|
|||
}
|
||||
|
||||
default:
|
||||
pa_log_error(__FILE__": ERROR: Unable to mix audio data of format %s.", pa_sample_format_to_string(spec->format));
|
||||
pa_log_error("ERROR: Unable to mix audio data of format %s.", pa_sample_format_to_string(spec->format));
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
|
@ -398,7 +398,7 @@ void pa_volume_memchunk(pa_memchunk*c, const pa_sample_spec *spec, const pa_cvol
|
|||
}
|
||||
|
||||
default:
|
||||
pa_log_error(__FILE__": ERROR: Unable to change volume of format %s.",
|
||||
pa_log_error("ERROR: Unable to change volume of format %s.",
|
||||
pa_sample_format_to_string(spec->format));
|
||||
abort();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ int pa_shm_create_rw(pa_shm *m, size_t size, int shared, mode_t mode) {
|
|||
|
||||
#ifdef MAP_ANONYMOUS
|
||||
if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS, fd, 0)) == MAP_FAILED) {
|
||||
pa_log(__FILE__": mmap() failed: %s", pa_cstrerror(errno));
|
||||
pa_log("mmap() failed: %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
#else
|
||||
|
|
@ -75,17 +75,17 @@ int pa_shm_create_rw(pa_shm *m, size_t size, int shared, mode_t mode) {
|
|||
segment_name(fn, sizeof(fn), m->id);
|
||||
|
||||
if ((fd = shm_open(fn, O_RDWR|O_CREAT|O_EXCL, mode & 0444)) < 0) {
|
||||
pa_log(__FILE__": shm_open() failed: %s", pa_cstrerror(errno));
|
||||
pa_log("shm_open() failed: %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (ftruncate(fd, m->size = size) < 0) {
|
||||
pa_log(__FILE__": ftruncate() failed: %s", pa_cstrerror(errno));
|
||||
pa_log("ftruncate() failed: %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) {
|
||||
pa_log(__FILE__": mmap() failed: %s", pa_cstrerror(errno));
|
||||
pa_log("mmap() failed: %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ void pa_shm_free(pa_shm *m) {
|
|||
#endif
|
||||
|
||||
if (munmap(m->ptr, m->size) < 0)
|
||||
pa_log(__FILE__": munmap() failed: %s", pa_cstrerror(errno));
|
||||
pa_log("munmap() failed: %s", pa_cstrerror(errno));
|
||||
|
||||
if (m->do_unlink) {
|
||||
segment_name(fn, sizeof(fn), m->id);
|
||||
|
|
@ -188,24 +188,24 @@ int pa_shm_attach_ro(pa_shm *m, unsigned id) {
|
|||
segment_name(fn, sizeof(fn), m->id = id);
|
||||
|
||||
if ((fd = shm_open(fn, O_RDONLY, 0)) < 0) {
|
||||
pa_log(__FILE__": shm_open() failed: %s", pa_cstrerror(errno));
|
||||
pa_log("shm_open() failed: %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (fstat(fd, &st) < 0) {
|
||||
pa_log(__FILE__": fstat() failed: %s", pa_cstrerror(errno));
|
||||
pa_log("fstat() failed: %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (st.st_size <= 0 || st.st_size > MAX_SHM_SIZE) {
|
||||
pa_log(__FILE__": Invalid shared memory segment size");
|
||||
pa_log("Invalid shared memory segment size");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
m->size = st.st_size;
|
||||
|
||||
if ((m->ptr = mmap(NULL, m->size, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) {
|
||||
pa_log(__FILE__": mmap() failed: %s", pa_cstrerror(errno));
|
||||
pa_log("mmap() failed: %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ pa_sink_input* pa_sink_input_new(
|
|||
CHECK_VALIDITY_RETURN_NULL(data->resample_method < PA_RESAMPLER_MAX);
|
||||
|
||||
if (pa_idxset_size(data->sink->inputs) >= PA_MAX_INPUTS_PER_SINK) {
|
||||
pa_log_warn(__FILE__": Failed to create sink input: too many inputs per sink.");
|
||||
pa_log_warn("Failed to create sink input: too many inputs per sink.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ pa_sink_input* pa_sink_input_new(
|
|||
&data->sample_spec, &data->channel_map,
|
||||
&data->sink->sample_spec, &data->sink->channel_map,
|
||||
data->resample_method))) {
|
||||
pa_log_warn(__FILE__": Unsupported resampling operation.");
|
||||
pa_log_warn("Unsupported resampling operation.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -177,7 +177,7 @@ pa_sink_input* pa_sink_input_new(
|
|||
r = pa_idxset_put(i->sink->inputs, i, NULL);
|
||||
assert(r == 0);
|
||||
|
||||
pa_log_info(__FILE__": created %u \"%s\" on %s with sample spec %s",
|
||||
pa_log_info("created %u \"%s\" on %s with sample spec %s",
|
||||
i->index,
|
||||
i->name,
|
||||
i->sink->name,
|
||||
|
|
@ -218,7 +218,7 @@ static void sink_input_free(pa_sink_input* i) {
|
|||
if (i->state != PA_SINK_INPUT_DISCONNECTED)
|
||||
pa_sink_input_disconnect(i);
|
||||
|
||||
pa_log_info(__FILE__": freed %u \"%s\"", i->index, i->name);
|
||||
pa_log_info("freed %u \"%s\"", i->index, i->name);
|
||||
|
||||
if (i->resampled_chunk.memblock)
|
||||
pa_memblock_unref(i->resampled_chunk.memblock);
|
||||
|
|
@ -522,7 +522,7 @@ int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately) {
|
|||
return 0;
|
||||
|
||||
if (pa_idxset_size(dest->inputs) >= PA_MAX_INPUTS_PER_SINK) {
|
||||
pa_log_warn(__FILE__": Failed to move sink input: too many inputs per sink.");
|
||||
pa_log_warn("Failed to move sink input: too many inputs per sink.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -544,7 +544,7 @@ int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately) {
|
|||
&i->sample_spec, &i->channel_map,
|
||||
&dest->sample_spec, &dest->channel_map,
|
||||
i->resample_method))) {
|
||||
pa_log_warn(__FILE__": Unsupported resampling operation.");
|
||||
pa_log_warn("Unsupported resampling operation.");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,12 +116,12 @@ pa_sink* pa_sink_new(
|
|||
assert(s->index != PA_IDXSET_INVALID && r >= 0);
|
||||
|
||||
pa_sample_spec_snprint(st, sizeof(st), spec);
|
||||
pa_log_info(__FILE__": created %u \"%s\" with sample spec \"%s\"", s->index, s->name, st);
|
||||
pa_log_info("created %u \"%s\" with sample spec \"%s\"", s->index, s->name, st);
|
||||
|
||||
n = pa_sprintf_malloc("%s.monitor", name);
|
||||
|
||||
if (!(s->monitor_source = pa_source_new(core, driver, n, 0, spec, map)))
|
||||
pa_log_warn(__FILE__": failed to create monitor source.");
|
||||
pa_log_warn("failed to create monitor source.");
|
||||
else {
|
||||
char *d;
|
||||
s->monitor_source->monitor_of = s;
|
||||
|
|
@ -176,7 +176,7 @@ static void sink_free(pa_sink *s) {
|
|||
if (s->state != PA_SINK_DISCONNECTED)
|
||||
pa_sink_disconnect(s);
|
||||
|
||||
pa_log_info(__FILE__": freed %u \"%s\"", s->index, s->name);
|
||||
pa_log_info("freed %u \"%s\"", s->index, s->name);
|
||||
|
||||
if (s->monitor_source) {
|
||||
pa_source_unref(s->monitor_source);
|
||||
|
|
|
|||
|
|
@ -140,17 +140,17 @@ static void do_call(pa_socket_client *c) {
|
|||
|
||||
lerror = sizeof(error);
|
||||
if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void*)&error, &lerror) < 0) {
|
||||
pa_log(__FILE__": getsockopt(): %s", pa_cstrerror(errno));
|
||||
pa_log("getsockopt(): %s", pa_cstrerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (lerror != sizeof(error)) {
|
||||
pa_log(__FILE__": getsockopt() returned invalid size.");
|
||||
pa_log("getsockopt() returned invalid size.");
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (error != 0) {
|
||||
pa_log_debug(__FILE__": connect(): %s", pa_cstrerror(errno));
|
||||
pa_log_debug("connect(): %s", pa_cstrerror(errno));
|
||||
errno = error;
|
||||
goto finish;
|
||||
}
|
||||
|
|
@ -192,10 +192,10 @@ static int do_connect(pa_socket_client *c, const struct sockaddr *sa, socklen_t
|
|||
if ((r = connect(c->fd, sa, len)) < 0) {
|
||||
#ifdef OS_IS_WIN32
|
||||
if (WSAGetLastError() != EWOULDBLOCK) {
|
||||
pa_log_debug(__FILE__": connect(): %d", WSAGetLastError());
|
||||
pa_log_debug("connect(): %d", WSAGetLastError());
|
||||
#else
|
||||
if (errno != EINPROGRESS) {
|
||||
pa_log_debug(__FILE__": connect(): %s (%d)", pa_cstrerror(errno), errno);
|
||||
pa_log_debug("connect(): %s (%d)", pa_cstrerror(errno), errno);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -267,7 +267,7 @@ static int sockaddr_prepare(pa_socket_client *c, const struct sockaddr *sa, size
|
|||
}
|
||||
|
||||
if ((c->fd = socket(sa->sa_family, SOCK_STREAM, 0)) < 0) {
|
||||
pa_log(__FILE__": socket(): %s", pa_cstrerror(errno));
|
||||
pa_log("socket(): %s", pa_cstrerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -485,7 +485,7 @@ pa_socket_client* pa_socket_client_new_string(pa_mainloop_api *m, const char*nam
|
|||
|
||||
/* FIXME: PF_INET6 support */
|
||||
if (hints.ai_family == PF_INET6) {
|
||||
pa_log_error(__FILE__": IPv6 is not supported on Windows");
|
||||
pa_log_error("IPv6 is not supported on Windows");
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ static void callback(pa_mainloop_api *mainloop, pa_io_event *e, int fd, PA_GCC_U
|
|||
pa_socket_server_ref(s);
|
||||
|
||||
if ((nfd = accept(fd, NULL, NULL)) < 0) {
|
||||
pa_log(__FILE__": accept(): %s", pa_cstrerror(errno));
|
||||
pa_log("accept(): %s", pa_cstrerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
@ -115,12 +115,12 @@ static void callback(pa_mainloop_api *mainloop, pa_io_event *e, int fd, PA_GCC_U
|
|||
request_init(&req, RQ_DAEMON, s->tcpwrap_service, RQ_FILE, nfd, NULL);
|
||||
fromhost(&req);
|
||||
if (!hosts_access(&req)) {
|
||||
pa_log_warn(__FILE__": TCP connection refused by tcpwrap.");
|
||||
pa_log_warn("TCP connection refused by tcpwrap.");
|
||||
close(nfd);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
pa_log_info(__FILE__": TCP connection accepted by tcpwrap.");
|
||||
pa_log_info("TCP connection accepted by tcpwrap.");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ pa_socket_server* pa_socket_server_new_unix(pa_mainloop_api *m, const char *file
|
|||
assert(m && filename);
|
||||
|
||||
if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) {
|
||||
pa_log(__FILE__": socket(): %s", pa_cstrerror(errno));
|
||||
pa_log("socket(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -188,7 +188,7 @@ pa_socket_server* pa_socket_server_new_unix(pa_mainloop_api *m, const char *file
|
|||
pa_socket_low_delay(fd);
|
||||
|
||||
if (bind(fd, (struct sockaddr*) &sa, SUN_LEN(&sa)) < 0) {
|
||||
pa_log(__FILE__": bind(): %s", pa_cstrerror(errno));
|
||||
pa_log("bind(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -199,7 +199,7 @@ pa_socket_server* pa_socket_server_new_unix(pa_mainloop_api *m, const char *file
|
|||
chmod(filename, 0777);
|
||||
|
||||
if (listen(fd, 5) < 0) {
|
||||
pa_log(__FILE__": listen(): %s", pa_cstrerror(errno));
|
||||
pa_log("listen(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ pa_socket_server* pa_socket_server_new_ipv4(pa_mainloop_api *m, uint32_t address
|
|||
assert(m && port);
|
||||
|
||||
if ((fd = socket(PF_INET, SOCK_STREAM, 0)) < 0) {
|
||||
pa_log(__FILE__": socket(PF_INET): %s", pa_cstrerror(errno));
|
||||
pa_log("socket(PF_INET): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -243,7 +243,7 @@ pa_socket_server* pa_socket_server_new_ipv4(pa_mainloop_api *m, uint32_t address
|
|||
|
||||
#ifdef SO_REUSEADDR
|
||||
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0)
|
||||
pa_log(__FILE__": setsockopt(): %s", pa_cstrerror(errno));
|
||||
pa_log("setsockopt(): %s", pa_cstrerror(errno));
|
||||
#endif
|
||||
|
||||
pa_socket_tcp_low_delay(fd);
|
||||
|
|
@ -254,12 +254,12 @@ pa_socket_server* pa_socket_server_new_ipv4(pa_mainloop_api *m, uint32_t address
|
|||
sa.sin_addr.s_addr = htonl(address);
|
||||
|
||||
if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
|
||||
pa_log(__FILE__": bind(): %s", pa_cstrerror(errno));
|
||||
pa_log("bind(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (listen(fd, 5) < 0) {
|
||||
pa_log(__FILE__": listen(): %s", pa_cstrerror(errno));
|
||||
pa_log("listen(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -286,7 +286,7 @@ pa_socket_server* pa_socket_server_new_ipv6(pa_mainloop_api *m, const uint8_t ad
|
|||
assert(m && port);
|
||||
|
||||
if ((fd = socket(PF_INET6, SOCK_STREAM, 0)) < 0) {
|
||||
pa_log(__FILE__": socket(PF_INET6): %s", pa_cstrerror(errno));
|
||||
pa_log("socket(PF_INET6): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -294,12 +294,12 @@ pa_socket_server* pa_socket_server_new_ipv6(pa_mainloop_api *m, const uint8_t ad
|
|||
|
||||
#ifdef IPV6_V6ONLY
|
||||
if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) < 0)
|
||||
pa_log(__FILE__": setsockopt(IPPROTO_IPV6, IPV6_V6ONLY): %s", pa_cstrerror(errno));
|
||||
pa_log("setsockopt(IPPROTO_IPV6, IPV6_V6ONLY): %s", pa_cstrerror(errno));
|
||||
#endif
|
||||
|
||||
#ifdef SO_REUSEADDR
|
||||
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0)
|
||||
pa_log(__FILE__": setsockopt(SOL_SOCKET, SO_REUSEADDR, 1): %s", pa_cstrerror(errno));
|
||||
pa_log("setsockopt(SOL_SOCKET, SO_REUSEADDR, 1): %s", pa_cstrerror(errno));
|
||||
#endif
|
||||
|
||||
pa_socket_tcp_low_delay(fd);
|
||||
|
|
@ -310,12 +310,12 @@ pa_socket_server* pa_socket_server_new_ipv6(pa_mainloop_api *m, const uint8_t ad
|
|||
memcpy(sa.sin6_addr.s6_addr, address, 16);
|
||||
|
||||
if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
|
||||
pa_log(__FILE__": bind(): %s", pa_cstrerror(errno));
|
||||
pa_log("bind(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (listen(fd, 5) < 0) {
|
||||
pa_log(__FILE__": listen(): %s", pa_cstrerror(errno));
|
||||
pa_log("listen(): %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -426,7 +426,7 @@ char *pa_socket_server_get_address(pa_socket_server *s, char *c, size_t l) {
|
|||
socklen_t sa_len = sizeof(sa);
|
||||
|
||||
if (getsockname(s->fd, (struct sockaddr*) &sa, &sa_len) < 0) {
|
||||
pa_log(__FILE__": getsockname(): %s", pa_cstrerror(errno));
|
||||
pa_log("getsockname(): %s", pa_cstrerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -447,7 +447,7 @@ char *pa_socket_server_get_address(pa_socket_server *s, char *c, size_t l) {
|
|||
char ip[INET6_ADDRSTRLEN];
|
||||
|
||||
if (!inet_ntop(AF_INET6, &sa.sin6_addr, ip, sizeof(ip))) {
|
||||
pa_log(__FILE__": inet_ntop(): %s", pa_cstrerror(errno));
|
||||
pa_log("inet_ntop(): %s", pa_cstrerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -462,7 +462,7 @@ char *pa_socket_server_get_address(pa_socket_server *s, char *c, size_t l) {
|
|||
socklen_t sa_len = sizeof(sa);
|
||||
|
||||
if (getsockname(s->fd, (struct sockaddr*) &sa, &sa_len) < 0) {
|
||||
pa_log(__FILE__": getsockname(): %s", pa_cstrerror(errno));
|
||||
pa_log("getsockname(): %s", pa_cstrerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -482,7 +482,7 @@ char *pa_socket_server_get_address(pa_socket_server *s, char *c, size_t l) {
|
|||
char ip[INET_ADDRSTRLEN];
|
||||
|
||||
if (!inet_ntop(AF_INET, &sa.sin_addr, ip, sizeof(ip))) {
|
||||
pa_log(__FILE__": inet_ntop(): %s", pa_cstrerror(errno));
|
||||
pa_log("inet_ntop(): %s", pa_cstrerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ int pa_socket_set_rcvbuf(int fd, size_t l) {
|
|||
assert(fd >= 0);
|
||||
|
||||
/* if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void*)&l, sizeof(l)) < 0) { */
|
||||
/* pa_log(__FILE__": SO_RCVBUF: %s", strerror(errno)); */
|
||||
/* pa_log("SO_RCVBUF: %s", strerror(errno)); */
|
||||
/* return -1; */
|
||||
/* } */
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ int pa_socket_set_sndbuf(int fd, size_t l) {
|
|||
assert(fd >= 0);
|
||||
|
||||
/* if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (void*)&l, sizeof(l)) < 0) { */
|
||||
/* pa_log(__FILE__": SO_SNDBUF: %s", strerror(errno)); */
|
||||
/* pa_log("SO_SNDBUF: %s", strerror(errno)); */
|
||||
/* return -1; */
|
||||
/* } */
|
||||
|
||||
|
|
@ -216,7 +216,7 @@ int pa_unix_socket_is_stale(const char *fn) {
|
|||
int fd = -1, ret = -1;
|
||||
|
||||
if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) {
|
||||
pa_log(__FILE__": socket(): %s", pa_cstrerror(errno));
|
||||
pa_log("socket(): %s", pa_cstrerror(errno));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ int pa_play_file(
|
|||
memset(&sfinfo, 0, sizeof(sfinfo));
|
||||
|
||||
if (!(u->sndfile = sf_open(fname, SFM_READ, &sfinfo))) {
|
||||
pa_log(__FILE__": Failed to open file %s", fname);
|
||||
pa_log("Failed to open file %s", fname);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ int pa_play_file(
|
|||
ss.channels = sfinfo.channels;
|
||||
|
||||
if (!pa_sample_spec_valid(&ss)) {
|
||||
pa_log(__FILE__": Unsupported sample format in file %s", fname);
|
||||
pa_log("Unsupported sample format in file %s", fname);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ int pa_sound_file_load(pa_mempool *pool, const char *fname, pa_sample_spec *ss,
|
|||
memset(&sfinfo, 0, sizeof(sfinfo));
|
||||
|
||||
if (!(sf = sf_open(fname, SFM_READ, &sfinfo))) {
|
||||
pa_log(__FILE__": Failed to open file %s", fname);
|
||||
pa_log("Failed to open file %s", fname);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ int pa_sound_file_load(pa_mempool *pool, const char *fname, pa_sample_spec *ss,
|
|||
ss->channels = sfinfo.channels;
|
||||
|
||||
if (!pa_sample_spec_valid(ss)) {
|
||||
pa_log(__FILE__": Unsupported sample format in file %s", fname);
|
||||
pa_log("Unsupported sample format in file %s", fname);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ int pa_sound_file_load(pa_mempool *pool, const char *fname, pa_sample_spec *ss,
|
|||
pa_channel_map_init_auto(map, ss->channels, PA_CHANNEL_MAP_DEFAULT);
|
||||
|
||||
if ((l = pa_frame_size(ss)*sfinfo.frames) > PA_SCACHE_ENTRY_SIZE_MAX) {
|
||||
pa_log(__FILE__": File too large");
|
||||
pa_log("File too large");
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ int pa_sound_file_load(pa_mempool *pool, const char *fname, pa_sample_spec *ss,
|
|||
|
||||
if ((readf_function && readf_function(sf, chunk->memblock->data, sfinfo.frames) != sfinfo.frames) ||
|
||||
(!readf_function && sf_read_raw(sf, chunk->memblock->data, l) != l)) {
|
||||
pa_log(__FILE__": Premature file end");
|
||||
pa_log("Premature file end");
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ int pa_sound_file_too_big_to_cache(const char *fname) {
|
|||
pa_sample_spec ss;
|
||||
|
||||
if (!(sf = sf_open(fname, SFM_READ, &sfinfo))) {
|
||||
pa_log(__FILE__": Failed to open file %s", fname);
|
||||
pa_log("Failed to open file %s", fname);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ int pa_sound_file_too_big_to_cache(const char *fname) {
|
|||
ss.channels = sfinfo.channels;
|
||||
|
||||
if ((pa_frame_size(&ss) * sfinfo.frames) > PA_SCACHE_ENTRY_SIZE_MAX) {
|
||||
pa_log(__FILE__": File too large %s", fname);
|
||||
pa_log("File too large %s", fname);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ pa_source_output* pa_source_output_new(
|
|||
CHECK_VALIDITY_RETURN_NULL(data->resample_method < PA_RESAMPLER_MAX);
|
||||
|
||||
if (pa_idxset_size(data->source->outputs) >= PA_MAX_OUTPUTS_PER_SOURCE) {
|
||||
pa_log(__FILE__": Failed to create source output: too many outputs per source.");
|
||||
pa_log("Failed to create source output: too many outputs per source.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ pa_source_output* pa_source_output_new(
|
|||
&data->source->sample_spec, &data->source->channel_map,
|
||||
&data->sample_spec, &data->channel_map,
|
||||
data->resample_method))) {
|
||||
pa_log_warn(__FILE__": Unsupported resampling operation.");
|
||||
pa_log_warn("Unsupported resampling operation.");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ pa_source_output* pa_source_output_new(
|
|||
r = pa_idxset_put(o->source->outputs, o, NULL);
|
||||
assert(r == 0);
|
||||
|
||||
pa_log_info(__FILE__": created %u \"%s\" on %s with sample spec %s",
|
||||
pa_log_info("created %u \"%s\" on %s with sample spec %s",
|
||||
o->index,
|
||||
o->name,
|
||||
o->source->name,
|
||||
|
|
@ -187,7 +187,7 @@ static void source_output_free(pa_source_output* o) {
|
|||
if (o->state != PA_SOURCE_OUTPUT_DISCONNECTED)
|
||||
pa_source_output_disconnect(o);
|
||||
|
||||
pa_log_info(__FILE__": freed %u \"%s\"", o->index, o->name);
|
||||
pa_log_info("freed %u \"%s\"", o->index, o->name);
|
||||
|
||||
if (o->resampler)
|
||||
pa_resampler_free(o->resampler);
|
||||
|
|
@ -313,7 +313,7 @@ int pa_source_output_move_to(pa_source_output *o, pa_source *dest) {
|
|||
return 0;
|
||||
|
||||
if (pa_idxset_size(dest->outputs) >= PA_MAX_OUTPUTS_PER_SOURCE) {
|
||||
pa_log_warn(__FILE__": Failed to move source output: too many outputs per source.");
|
||||
pa_log_warn("Failed to move source output: too many outputs per source.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -334,7 +334,7 @@ int pa_source_output_move_to(pa_source_output *o, pa_source *dest) {
|
|||
&dest->sample_spec, &dest->channel_map,
|
||||
&o->sample_spec, &o->channel_map,
|
||||
o->resample_method))) {
|
||||
pa_log_warn(__FILE__": Unsupported resampling operation.");
|
||||
pa_log_warn("Unsupported resampling operation.");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ pa_source* pa_source_new(
|
|||
assert(s->index != PA_IDXSET_INVALID && r >= 0);
|
||||
|
||||
pa_sample_spec_snprint(st, sizeof(st), spec);
|
||||
pa_log_info(__FILE__": created %u \"%s\" with sample spec \"%s\"", s->index, s->name, st);
|
||||
pa_log_info("created %u \"%s\" with sample spec \"%s\"", s->index, s->name, st);
|
||||
|
||||
pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_SOURCE | PA_SUBSCRIPTION_EVENT_NEW, s->index);
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ static void source_free(pa_source *s) {
|
|||
if (s->state != PA_SOURCE_DISCONNECTED)
|
||||
pa_source_disconnect(s);
|
||||
|
||||
pa_log_info(__FILE__": freed %u \"%s\"", s->index, s->name);
|
||||
pa_log_info("freed %u \"%s\"", s->index, s->name);
|
||||
|
||||
pa_idxset_free(s->outputs, NULL, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ static pa_x11_wrapper* x11_wrapper_new(pa_core *c, const char *name, const char
|
|||
int r;
|
||||
|
||||
if (!(d = XOpenDisplay(name))) {
|
||||
pa_log(__FILE__": XOpenDisplay() failed");
|
||||
pa_log("XOpenDisplay() failed");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue