Module: sip-router
Branch: master
Commit: 5569491ae90a7c74689ecd7e923c88f93690112a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5569491…
Author: Jason Penton <jason.penton(a)gmail.com>
Committer: Jason Penton <jason.penton(a)gmail.com>
Date: Fri Nov 28 10:14:51 2014 +0200
modules/cdp: Add fix for order of AVP related auth sessions, like Rx.
- Session-Id restored as first header for request
---
modules/cdp/authstatemachine.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/cdp/authstatemachine.c b/modules/cdp/authstatemachine.c
index 49a7cd4..50d6ed7 100644
--- a/modules/cdp/authstatemachine.c
+++ b/modules/cdp/authstatemachine.c
@@ -145,7 +145,7 @@ void add_auth_session_timers(cdp_auth_session_t *x, AAAMessage *msg)
{
}
set_4bytes(data, v);
avp = AAACreateAVP(AVP_Authorization_Lifetime, AAA_AVP_FLAG_MANDATORY, 0, data,
4, AVP_DUPLICATE_DATA);
- if (avp) AAAAddAVPToMessage(msg, avp, 0);
+ if (avp) AAAAddAVPToMessage(msg, avp, msg->avpList.tail);
}
if (x->lifetime != -1) {
avp = AAAFindMatchingAVP(msg, 0, AVP_Auth_Grace_Period, 0, 0);
@@ -153,7 +153,7 @@ void add_auth_session_timers(cdp_auth_session_t *x, AAAMessage *msg)
{
v = x->grace_period;
set_4bytes(data, v);
avp = AAACreateAVP(AVP_Auth_Grace_Period, AAA_AVP_FLAG_MANDATORY, 0, data, 4,
AVP_DUPLICATE_DATA);
- if (avp) AAAAddAVPToMessage(msg, avp, 0);
+ if (avp) AAAAddAVPToMessage(msg, avp, msg->avpList.tail);
}
}
avp = AAAFindMatchingAVP(msg, 0, AVP_Session_Timeout, 0, 0);
@@ -165,7 +165,7 @@ void add_auth_session_timers(cdp_auth_session_t *x, AAAMessage *msg)
{
}
set_4bytes(data, v);
avp = AAACreateAVP(AVP_Session_Timeout, AAA_AVP_FLAG_MANDATORY, 0, data, 4,
AVP_DUPLICATE_DATA);
- if (avp) AAAAddAVPToMessage(msg, avp, 0);
+ if (avp) AAAAddAVPToMessage(msg, avp, msg->avpList.tail);
}
}