[asterisk-bugs] [Asterisk 0018969]: Dead code - ast_FD_SETSIZE
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Mar 14 16:57:04 CDT 2011
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=18969
======================================================================
Reported By: oej
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 18969
Category: General
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Asterisk Version: Addons-1.6.2.3
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2011-03-14 08:22 CDT
Last Modified: 2011-03-14 16:57 CDT
======================================================================
Summary: Dead code - ast_FD_SETSIZE
Description:
There is a lot of code in main/asterisk.c that depends on
configure_ran_as_root that aims to set a variable (defined in poll.c)
called ast_FD_SETSIZE: In Asterisk 1.6.0 this variable was used in an
inline function in select.h - but it is now gone (ast_select()).
I can't find the ast_FD_SETSIZE being used anywhere else, so it seems like
we have a lot of dead meat hanging around that needs some cleaning up. This
could potentially affect configure, main/asterisk.c main/poll.c and
select.h (an external reference).
======================================================================
----------------------------------------------------------------------
(0132921) tilghman (manager) - 2011-03-14 16:57
https://issues.asterisk.org/view.php?id=18969#c132921
----------------------------------------------------------------------
The problem I ran into with this is that it's impossible to use a define
set at runtime to vary the size of a structure (specifically, the bitfield
used by select(2). Yes, some of the code in main/asterisk.c is dead, but
the majority of it is not -- it produces important warnings when Asterisk
configure was not run as root, to tell the user that Very Bad Things could
happen on systems where poll(2) is not available.
So yes, you can remove the variable itself, and you can remove the very
few lines that set it, but leave the rest of the code alone.
Issue History
Date Modified Username Field Change
======================================================================
2011-03-14 16:57 tilghman Note Added: 0132921
======================================================================
More information about the asterisk-bugs
mailing list