Commit 71e49869 authored by Kai Vehmanen's avatar Kai Vehmanen

Fixed a compilation error on gcc, where a enum-casted-as-int was given to the...

Fixed a compilation error on gcc, where a enum-casted-as-int was given to the unary operator. Passing enums directly to INTTAG_REF() macros is not an option either as MSVC2005 chokes on them, so we'll use a temporary pointer for casting to make both compilers happy.

darcs-hash:20060828140734-7659e-111096a8aac7be4ff8c78b7002b7c84379cd4197.gz
parent 897b2e3e
......@@ -253,13 +253,16 @@ void nua_stack_authorize(nua_t *nua,
tagi_t const *tags)
{
nea_sub_t *sub = NULL;
nea_state_t state = nea_extended;
nea_state_t state;
int state_as_int = (int)nea_extended;
tl_gets(tags,
NEATAG_SUB_REF(sub),
NUTAG_SUBSTATE_REF((int)state),
NUTAG_SUBSTATE_REF(state_as_int),
TAG_END());
state = (nea_state_t)state_as_int;
if (sub && state > 0) {
nea_sub_auth(sub, state, TAG_NEXT(tags));
nua_stack_event(nua, nh, NULL, e, SIP_200_OK, TAG_END());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment