diff extensions/app_radgw/rgw_worker.c @ 535:72c511043f05

A few bug fixes on the RADIUS/Diameter gateway.
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 09 Sep 2010 14:17:54 +0900
parents 1c2f5ee38039
children 345537783a90
line wrap: on
line diff
--- a/extensions/app_radgw/rgw_worker.c	Wed Sep 08 15:52:29 2010 +0900
+++ b/extensions/app_radgw/rgw_worker.c	Thu Sep 09 14:17:54 2010 +0900
@@ -284,11 +284,6 @@
 	}
 	
 	
-	if (!keepsession) {
-		/* Destroy remaining session data (stateless gateway) */
-		CHECK_FCT_DO( fd_sess_destroy(&pa->sess),  );
-	}
-	
 	/* Now try and send the RADIUS answer */
 	if (rad_ans) {
 		CHECK_FCT_DO( rgw_client_finish_send(&rad_ans, pa->rad, pa->cli), );	
@@ -301,6 +296,11 @@
 		*ans = NULL;
 	}
 	
+	if (!keepsession) {
+		/* Destroy remaining session data (stateless gateway) */
+		CHECK_FCT_DO( fd_sess_destroy(&pa->sess),  );
+	}
+	
 	/* Clear the RADIUS request */
 	if (pa->rad) {
 		rgw_msg_free(&pa->rad);
"Welcome to our mercurial repository"