diff extensions/app_radgw/rgw_plugins.c @ 255:cb4307a1cd29

Added two plugins for RADIUS/Diameter gateway debug.
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 15 Apr 2010 11:56:32 +0900
parents a857024cb48b
children 042af0000c0a
line wrap: on
line diff
--- a/extensions/app_radgw/rgw_plugins.c	Wed Apr 14 18:30:22 2010 +0900
+++ b/extensions/app_radgw/rgw_plugins.c	Thu Apr 15 11:56:32 2010 +0900
@@ -219,6 +219,7 @@
 			fd_log_debug("An error occurred while parsing configuration file '%s' in plugin '%s', aborting...\n", new->conffile, new->plgname);
 			goto error;
 		}
+		TRACE_DEBUG(INFO, "RADIUS/Diameter gateway plugin '%s%s%s%s' initialized.", new->plgname, conffile ? " (" : "",  conffile ? new->conffile : "", conffile ? ")" : "");
 	}
 	
 	/* Now sort the array (very simple algorithm, but this list is usually small) of command codes and save */
@@ -492,10 +493,12 @@
 		struct plg_descr * plg = (struct plg_descr *) plg_list.next;
 		fd_list_unlink(&plg->chain);
 		free(plg->conffile);
+		free(plg->cc);
+		if (plg->cs && plg->descriptor && plg->descriptor->rgwp_conf_free ) {
+			TRACE_DEBUG(INFO, "RADIUS/Diameter gateway plugin '%s' cleaning up...", plg->plgname);
+			(*plg->descriptor->rgwp_conf_free)(plg->cs);
+		}
 		free(plg->plgname);
-		free(plg->cc);
-		if (plg->cs && plg->descriptor && plg->descriptor->rgwp_conf_free )
-			(*plg->descriptor->rgwp_conf_free)(plg->cs);
 		dlclose(plg->dlo);
 		free(plg);
 	}
"Welcome to our mercurial repository"