[asterisk-dev] func_devstate - compile error - version issue?
Mark Michelson
mmichelson at digium.com
Mon Jun 14 16:08:51 CDT 2010
On 06/14/2010 02:14 PM, Ted Guarriello wrote:
>
> I went to compile the latest devstate.c into an asterisk 1.4
> deployment (PIAF 1.6) and received an error regarding the declaration
> of state_val on line 188. The correction is obvious: change the
> declaration from “enum ast_devstate_val state_val;” to “int
> state_val;” based on the fact that ast_devstate_val() returns an int
> on line 206. Although I am sure this is the problem in my current
> deployment, I am baffled at how it might have become an issue – was
> state_val once an enum before the tokens were defined in devicestate.h
> - am I crossing versions?
>
It sounds like you've got some frankenversion of Asterisk in use. In
1.4, there is no function called ast_devstate_val(). Likely, you
backported this at some point and had it return an int since it is
common in 1.4 for device states to be passed around as ints. Your
suggestion of changing the declaration to an int should safely resolve
the situation.
Also, for the record, avoid terms like "the latest devstate.c" on this
mailing list. Since we deal with several branches of Asterisk, it is
much more useful to state a specific branch and SVN revision or a
specific release of Asterisk if that is what you are using.
Mark Michelson
More information about the asterisk-dev
mailing list