Closed
Bug 479929
Opened 15 years ago
Closed 14 years ago
Return value of esd_open_sound not checked correctly
Categories
(Core :: Widget: Gtk, defect)
Core
Widget: Gtk
Tracking
()
RESOLVED
FIXED
People
(Reporter: kinetik, Assigned: kinetik)
References
Details
Attachments
(2 files)
2.57 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
1.73 KB,
patch
|
Details | Diff | Splinter Review |
esd_open_sound returns a file descriptor, we test for (!fd) when we should test for (fd < 0). Note: this is a spin off of my patch from bug 469635.
Assignee | ||
Comment 1•15 years ago
|
||
Also removes confusing/useless comments.
Assignee: nobody → kinetik
Attachment #363833 -
Flags: superreview?(roc)
Attachment #363833 -
Flags: review?(roc)
Attachment #363833 -
Flags: superreview?(roc)
Attachment #363833 -
Flags: superreview+
Attachment #363833 -
Flags: review?(roc)
Attachment #363833 -
Flags: review+
Assignee | ||
Comment 2•15 years ago
|
||
Pushed 5ac18226837e.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 4•14 years ago
|
||
Comment on attachment 363833 [details] [diff] [review] patch v1 > if (!elib) { >- /* we don't need to do esd_open_sound if we are only going to play files >- but we will if we want to do things like streams, etc */ >- EsdOpenSoundType EsdOpenSound; >- > elib = PR_LoadLibrary("libesd.so.0"); > if (elib) { >- EsdOpenSound = (EsdOpenSoundType) PR_FindFunctionSymbol(elib, "esd_open_sound"); >+ EsdOpenSoundType EsdOpenSound = >+ (EsdOpenSoundType) PR_FindFunctionSymbol(elib, "esd_open_sound"); > if (!EsdOpenSound) { > PR_UnloadLibrary(elib); > elib = nsnull; > } else { > esdref = (*EsdOpenSound)("localhost"); >- if (!esdref) { >+ if (esdref < 0) { I consider this patch/fix broken. It makes sense at first glance but it doesn't fit reality AFAICS. 1. The error return code of esd_open_sound() is defined as -1 in any case (no need to fiddle with that) 2. The comment which was removed /* we don't need to do esd_open_sound if we are only going to play files */ seems to be perfectly true. The usecase of notification in TB, SM and FF is playing WAV files. This definitely works w/o esd running and therefore the !esdref makes more sense than esdref < 0 The new implementation unloads libesd just because no esd is running which is done under the assumption that libesd cannot output anything w/o esd running what is not true.
Comment 5•14 years ago
|
||
reopening (or do we need a new bug?)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 6•14 years ago
|
||
Comment 7•14 years ago
|
||
Created new bug 579877 to allow proper tracking.
Status: REOPENED → RESOLVED
Closed: 15 years ago → 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•