]> git.alsa-project.org Git - alsa-plugins.git/commit
jack: Restore PID to jack client name when not specified explicitly
authorBranan Purvine-Riley <branan@gmail.com>
Fri, 8 Aug 2014 21:31:06 +0000 (14:31 -0700)
committerTakashi Iwai <tiwai@suse.de>
Tue, 12 Aug 2014 13:55:50 +0000 (15:55 +0200)
commit3089c5826289f923c8bc63855da681cfdc7125d6
tree04d2a8e44ddd4b6ff632f17def632765ba9a6e46
parentdcdc8a75246649efe4bc56c26ac28f605523487d
jack: Restore PID to jack client name when not specified explicitly

Commit 14190cd8 added a facility to explicitly name Jack clients with
a 'name' option, but did so in a way that was not fully
backwards-compatible with older versions of the alsa-plugins. There
were two issues:

1. Re-using the magical "name" variable, which comes preloaded with
the name of the PCM

2. The code assumed snd_config_get_string sets a variable to NULL if
the config entry does not exist. Instead, this function leaves the
variable unchanged.

The result of these two errors meant that the PCM name would be
treated as if it were a user-defined name, and the old code which
embedded the PID would never be run

This code uses a completely new variable to store the explicitly-set
client name, so that the two code paths no longer collide.

[fixed trivial coding style issues by tiwai]

Signed-off-by: Branan Purvine-Riley <branan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
jack/pcm_jack.c