Module Name:    src
Committed By:   tteras
Date:           Fri Jan 28 13:00:14 UTC 2011

Modified Files:
        src/crypto/dist/ipsec-tools/src/racoon: remoteconf.c remoteconf.h
            session.c

Log Message:
>From Roman Hoog Antink <[email protected]>: Clean up rmconf reloading: rename
the functions, and remove unneeded global variable.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 \
    src/crypto/dist/ipsec-tools/src/racoon/remoteconf.c
cvs rdiff -u -r1.12 -r1.13 \
    src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h
cvs rdiff -u -r1.28 -r1.29 src/crypto/dist/ipsec-tools/src/racoon/session.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/dist/ipsec-tools/src/racoon/remoteconf.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/remoteconf.c:1.21 src/crypto/dist/ipsec-tools/src/racoon/remoteconf.c:1.22
--- src/crypto/dist/ipsec-tools/src/racoon/remoteconf.c:1.21	Wed Sep  8 12:18:35 2010
+++ src/crypto/dist/ipsec-tools/src/racoon/remoteconf.c	Fri Jan 28 13:00:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: remoteconf.c,v 1.21 2010/09/08 12:18:35 vanhu Exp $	*/
+/*	$NetBSD: remoteconf.c,v 1.22 2011/01/28 13:00:14 tteras Exp $	*/
 
 /* Id: remoteconf.c,v 1.38 2006/05/06 15:52:44 manubsd Exp */
 
@@ -79,7 +79,8 @@
 #include "handler.h"
 #include "genlist.h"
 
-static TAILQ_HEAD(_rmtree, remoteconf) rmtree, rmtree_save, rmtree_tmp;
+typedef TAILQ_HEAD(_rmtree, remoteconf) remoteconf_tailq_head_t;
+static remoteconf_tailq_head_t rmtree, rmtree_save;
 
 /*
  * Script hook names and script hook paths
@@ -744,15 +745,17 @@
 }
 
 void
-save_rmconf()
+rmconf_start_reload()
 {
 	rmtree_save=rmtree;
 	initrmconf();
 }
 
 void
-save_rmconf_flush()
+rmconf_finish_reload()
 {
+	remoteconf_tailq_head_t rmtree_tmp;
+
 	rmtree_tmp=rmtree;
 	rmtree=rmtree_save;
 	flushrmconf();

Index: src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h
diff -u src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h:1.12 src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h:1.13
--- src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h:1.12	Tue Jun 22 09:41:33 2010
+++ src/crypto/dist/ipsec-tools/src/racoon/remoteconf.h	Fri Jan 28 13:00:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: remoteconf.h,v 1.12 2010/06/22 09:41:33 vanhu Exp $	*/
+/*	$NetBSD: remoteconf.h,v 1.13 2011/01/28 13:00:14 tteras Exp $	*/
 
 /* Id: remoteconf.h,v 1.26 2006/05/06 15:52:44 manubsd Exp */
 
@@ -209,8 +209,8 @@
 extern void remrmconf __P((struct remoteconf *));
 extern void flushrmconf __P((void));
 extern void initrmconf __P((void));
-extern void save_rmconf __P((void));
-extern void save_rmconf_flush __P((void));
+extern void rmconf_start_reload __P((void));
+extern void rmconf_finish_reload __P((void));
 
 extern int check_etypeok __P((struct remoteconf *, void *));
 

Index: src/crypto/dist/ipsec-tools/src/racoon/session.c
diff -u src/crypto/dist/ipsec-tools/src/racoon/session.c:1.28 src/crypto/dist/ipsec-tools/src/racoon/session.c:1.29
--- src/crypto/dist/ipsec-tools/src/racoon/session.c:1.28	Thu Oct 21 06:15:28 2010
+++ src/crypto/dist/ipsec-tools/src/racoon/session.c	Fri Jan 28 13:00:14 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: session.c,v 1.28 2010/10/21 06:15:28 tteras Exp $	*/
+/*	$NetBSD: session.c,v 1.29 2011/01/28 13:00:14 tteras Exp $	*/
 
 /*	$KAME: session.c,v 1.32 2003/09/24 02:01:17 jinmei Exp $	*/
 
@@ -391,8 +391,7 @@
 
 	/* TODO: save / restore / flush old lcconf (?) / rmtree
 	 */
-	save_rmconf();
-	initrmconf();
+	rmconf_start_reload();
 
 #ifdef HAVE_LIBRADIUS
 	/* free and init radius configuration */
@@ -431,7 +430,7 @@
 	 */
 
 	save_sainfotree_flush();
-	save_rmconf_flush();
+	rmconf_finish_reload();
 }
 
 static void

Reply via email to