After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 156806 - esddsp/libesd destroys ESPEAKER port
esddsp/libesd destroys ESPEAKER port
Status: RESOLVED DUPLICATE of bug 167609
Product: esound
Classification: Deprecated
Component: general
0.2.31
Other Linux
: Normal normal
: ---
Assigned To: Esound Maintainers
Esound Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-10-29 13:52 UTC by Peter Åstrand
Modified: 2005-02-17 02:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Peter Åstrand 2004-10-29 13:52:43 UTC
When using esddsp with a ESPEAKER variable that looks "127.0.0.1:4920", the
preloaded library modifies the environment variable, and removes the port. The
effect is that the library tries to connect to port 16001, even though port 4920
has been specified! This can be verified by looking at the processes environment
just after start, and then after the application has been trying to use /dev/dsp:

<start appliation, and immediately halt it>

$ cat /proc/30735/environ | awk '{gsub("\0", "\n"); print $0}' | grep ^ESPEAKER
ESPEAKER=127.0.0.1:4920

<let application continue, and open /dev/dsp>

cat /proc/30735/environ | awk '{gsub("\0", "\n"); print $0}' | grep ^ESPEAKER
ESPEAKER=127.0.0.1

I've also verified that it helps to insert a strdup() around the two getenv()
calls in esdlib.c. So, somehow, esdlib.c modifies the result from getenv()
Comment 1 Peter Åstrand 2004-10-29 13:57:05 UTC
Some more evidence of the problem:

* During the execution of the program, libesd writes to stderr:

/dev/dsp: Connection refused

* By doing a strace, one can see that it is indeed trying to correct to the
wrong port:

connect(5, {sa_family=AF_INET, sin_port=htons(16001),
sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused)
Comment 2 Jeff Waugh 2005-02-17 02:29:03 UTC

*** This bug has been marked as a duplicate of 167609 ***