changeset 294:0e940240c436

Fix application id in the STR header. Not sure what is really expected there, though...
author Sebastien Decugis <sdecugis@nict.go.jp>
date Mon, 10 May 2010 15:08:32 +0900
parents ec67c5096eeb
children d4c9fb55ca3a
files extensions/app_radgw/rgwx_acct.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/extensions/app_radgw/rgwx_acct.c	Mon May 10 14:43:06 2010 +0900
+++ b/extensions/app_radgw/rgwx_acct.c	Mon May 10 15:08:32 2010 +0900
@@ -1193,6 +1193,7 @@
 	/* If it was a response to a STOP record, we must send an STR for this session */
 	if (st->send_str) {
 		struct msg * str = NULL;
+		struct msg_hdr * hdr = NULL;
 		char * fqdn;
 		char * realm;
 		union avp_value avp_val;
@@ -1200,6 +1201,10 @@
 		/* Create a new STR message */
 		CHECK_FCT(  fd_msg_new ( cs->dict.Session_Termination_Request, MSGFL_ALLOC_ETEID, &str )  );
 		
+		/* Set the application-id to the auth application if available, accouting otherwise (not sure what is actually expected...) */
+		CHECK_FCT( fd_msg_hdr ( str, &hdr ) );
+		hdr->msg_appl = st->auth_appl ?: AI_ACCT;
+		
 		/* Add the Session-Id AVP as first AVP */
 		CHECK_FCT( fd_msg_avp_new (  cs->dict.Session_Id, 0, &avp ) );
 		CHECK_FCT( fd_msg_avp_setvalue ( avp, sid->avp_value ) );
"Welcome to our mercurial repository"