[pulseaudio-commits] r2475 - /trunk/src/pulse/context.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Wed May 21 15:44:38 PDT 2008
Author: lennart
Date: Thu May 22 00:44:37 2008
New Revision: 2475
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2475&root=pulseaudio&view=rev
Log:
deal with failing pa_runtime_path()
Modified:
trunk/src/pulse/context.c
Modified: trunk/src/pulse/context.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulse/context.c?rev=2475&root=pulseaudio&r1=2474&r2=2475&view=diff
==============================================================================
--- trunk/src/pulse/context.c (original)
+++ trunk/src/pulse/context.c Thu May 22 00:44:37 2008
@@ -103,7 +103,9 @@
if (c->autospawn_lock_fd >= 0) {
char *lf;
- lf = pa_runtime_path(AUTOSPAWN_LOCK);
+ if (!(lf = pa_runtime_path(AUTOSPAWN_LOCK)))
+ pa_log_warn("Cannot unlock autospawn because runtime path is no more.");
+
pa_unlock_lockfile(lf, c->autospawn_lock_fd);
pa_xfree(lf);
@@ -819,8 +821,10 @@
}
/* The per-user instance */
- c->server_list = pa_strlist_prepend(c->server_list, ufn = pa_runtime_path(PA_NATIVE_DEFAULT_UNIX_SOCKET));
- pa_xfree(ufn);
+ if ((ufn = pa_runtime_path(PA_NATIVE_DEFAULT_UNIX_SOCKET))) {
+ c->server_list = pa_strlist_prepend(c->server_list, ufn);
+ pa_xfree(ufn);
+ }
/* Wrap the connection attempts in a single transaction for sane autospawn locking */
if (!(flags & PA_CONTEXT_NOAUTOSPAWN) && c->conf->autospawn) {
More information about the pulseaudio-commits
mailing list