changeset 537:616848d6f020

Backed out changeset: f95cfc35d960
author Sebastien Decugis <sdecugis@nict.go.jp>
date Fri, 10 Sep 2010 23:03:43 +0900
parents f95cfc35d960
children deb901984ce3
files extensions/app_radgw/rgwx_acct.c
diffstat 1 files changed, 1 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/extensions/app_radgw/rgwx_acct.c	Fri Sep 10 10:59:14 2010 +0900
+++ b/extensions/app_radgw/rgwx_acct.c	Fri Sep 10 23:03:43 2010 +0900
@@ -158,17 +158,8 @@
 	application_id_t auth_appl;	/* Auth-Application-Id used for this session, if available (stored in a Class attribute) */
 	int		 send_str;	/* If not 0, we must send a STR when the ACA is received. */
 	uint32_t	 term_cause;	/* If not 0, the Termination-Cause to put in the STR. */
-	/* Temporary : try sending the User-Name back in Accounting-Response for RADIUS */
-	uint8_t		*username;
-	size_t		 un_size;
 };
 
-static void free_sess_state(struct sess_state *s) {
-	if (s)
-		free(s->username);
-	free(s);
-}
-
 /* Initialize the plugin */
 static int acct_conf_parse(char * conffile, struct rgwp_config ** state)
 {
@@ -181,7 +172,7 @@
 	CHECK_MALLOC( new = malloc(sizeof(struct rgwp_config)) );
 	memset(new, 0, sizeof(struct rgwp_config));
 	
-	CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, free_sess_state ) );
+	CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, free ) );
 	new->confstr = conffile;
 	
 	if (conffile && strstr(conffile, "nonai"))
@@ -1195,11 +1186,6 @@
 			st->send_str = send_str;
 		}
 		st->term_cause = str_cause;
-		if (un && un_len) {
-			CHECK_MALLOC( st->username = malloc(un_len) );
-			memcpy(st->username, un, un_len);
-			st->un_size = un_len;
-		}
 		CHECK_FCT( fd_sess_state_store( cs->sess_hdl, *session, &st ) );
 	}
 	
@@ -1366,11 +1352,6 @@
 		   Accounting-Response packets except Proxy-State and possibly Vendor-
 		   Specific.
 	*/
-	
-	/* Well, it seems some devices are expecting the user name ??? */
-	if (st->username) {
-		CHECK_MALLOC(radius_msg_add_attr(*rad_fw, RADIUS_ATTR_USER_NAME, st->username, st->un_size));
-	}
 
 	/* Now loop in the list of AVPs and convert those that we know how */
 	CHECK_FCT( fd_msg_browse(*diam_ans, MSG_BRW_FIRST_CHILD, &next, NULL) );
@@ -1443,8 +1424,6 @@
 	      
 	      -- done in radius_msg_finish_srv 
 	*/
-	
-	free_sess_state(st);
 
 	return 0;
 }
"Welcome to our mercurial repository"