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 135597 - make gstosselement properly deal with symlinks
make gstosselement properly deal with symlinks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 0.7.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-02-27 13:48 UTC by Christophe Fergeau
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use stat instead of lstat (839 bytes, patch)
2004-02-27 13:54 UTC, Christophe Fergeau
none Details | Review
improved patch (5.24 KB, patch)
2004-02-28 21:27 UTC, Christophe Fergeau
none Details | Review

Description Christophe Fergeau 2004-02-27 13:48:08 UTC
On my system (alsa + oss emulation), /dev/dsp is a symlink to /dev/dsp0
When trying to enumerate the available devices, gstosselement doesn't
follow the /dev/dsp symlink, and thus fails to see it is a char device, and
it doesn't test /dev/dsp0 at all.
The attached patch makes gstosselement follow the symlink, but after
thinking a bit more about it, it can create aliasing issues if it's a
symlink to /dev/dspN, N > 1
Maybe it would be better not to follow symlinks, and to probe both /dev/dsp
and /dev/dsp0.
Comment 1 Christophe Fergeau 2004-02-27 13:54:40 UTC
Created attachment 24848 [details] [review]
use stat instead of lstat
Comment 2 Christophe Fergeau 2004-02-28 21:25:10 UTC
Here is a reworked version of the code enumerating oss devices. It
looks for available /dev/dspN-/dev/mixerN and
/dev/sound/dspN-/dev/sound/mixerN pairs, and detects duplicates using
device numbers.
Comment 3 Christophe Fergeau 2004-02-28 21:27:09 UTC
Created attachment 24909 [details] [review]
improved patch
Comment 4 Ronald Bultje 2004-02-29 02:09:51 UTC
Looks sane, feel free to apply. If you want me to apply, please tell me.
Comment 5 Christophe Fergeau 2004-02-29 10:43:04 UTC
I committed the patch to CVS HEAD.