From: "cron2 (Code Review)" Date: Tue, 4 Nov 2025 17:23:04 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., antonio@...2726... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="XhJZgv+dTa0="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: init: make some functions static List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --XhJZgv+dTa0= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= ordex. ( http://gerrit.openvpn.net/c/openvpn/+/1346?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by flichtenheld Change subject: init: make some functions static ...................................................................... init: make some functions static A bunch of functions are defined and used within init.c only. We can therefore drop their declaration in init.h and make them static. Change-Id: I2b5429841bcd46376241890ace50b82a291b7400 Signed-off-by: Antonio Quartulli Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1346 Message-Id: <20251104104448.98093-1-frank@...2641...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34= 193.html Signed-off-by: Gert Doering --- M src/openvpn/init.c M src/openvpn/init.h 2 files changed, 26 insertions(+), 32 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/46/1346/2 diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 1bdaf27..8d95d5c 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -71,13 +71,13 @@ static bool do_deferred_p2p_ncp(struct context *c); -void +static void context_clear(struct context *c) { CLEAR(*c); } -void +static void context_clear_1(struct context *c) { CLEAR(c->c1); @@ -4430,32 +4430,9 @@ } /* - * Initialize a tunnel instance, handle pre and post-init - * signal settings. - */ -void -init_instance_handle_signals(struct context *c, const struct env_set *env,= const unsigned int flags) -{ - pre_init_signal_catch(); - init_instance(c, env, flags); - post_init_signal_catch(); - - /* - * This is done so that signals thrown during - * initialization can bring us back to - * a management hold. - */ - if (IS_SIG(c)) - { - remap_signal(c); - uninit_management_callback(); - } -} - -/* * Initialize a tunnel instance. */ -void +static void init_instance(struct context *c, const struct env_set *env, const unsigned= int flags) { const struct options *options =3D &c->options; @@ -4745,6 +4722,29 @@ } =20 /* + * Initialize a tunnel instance, handle pre and post-init + * signal settings. + */ +void +init_instance_handle_signals(struct context *c, const struct env_set *env,= const unsigned int flags) +{ + pre_init_signal_catch(); + init_instance(c, env, flags); + post_init_signal_catch(); + + /* + * This is done so that signals thrown during + * initialization can bring us back to + * a management hold. + */ + if (IS_SIG(c)) + { + remap_signal(c); + uninit_management_callback(); + } +} + +/* * Close a tunnel instance. */ void diff --git a/src/openvpn/init.h b/src/openvpn/init.h index e89615b..97318ec 100644 --- a/src/openvpn/init.h +++ b/src/openvpn/init.h @@ -31,10 +31,6 @@ */ #define BASE_N_EVENTS 5 -void context_clear(struct context *c); - -void context_clear_1(struct context *c); - void context_clear_2(struct context *c); void context_init_1(struct context *c); @@ -64,8 +60,6 @@ void init_instance_handle_signals(struct context *c, const struct env_set = *env, const unsigned int flags); -void init_instance(struct context *c, const struct env_set *env, const uns= igned int flags); - /** * Query for private key and auth-user-pass username/passwords. */ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1346?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I2b5429841bcd46376241890ace50b82a291b7400 Gerrit-Change-Number: 1346 Gerrit-PatchSet: 2 Gerrit-Owner: ordex Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --XhJZgv+dTa0= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #2 to the change originally created by ordex.

<= p>View C= hange

The following approvals got outdated and were removed: Code-Review+2 by flichtenheld

init: make some functions st=
atic

A bunch of functions are defined and used within init.c only.We can therefore drop their declaration in init.h and make
them static= .

Change-Id: I2b5429841bcd46376241890ace50b82a291b7400
Signed-off= -by: Antonio Quartulli <antonio@...2726...>
Acked-by: Frank Lichte= nheld <frank@...2641...>
Gerrit URL: https://gerrit.openvpn.net/c/= openvpn/+/1346
Message-Id: <20251104104448.98093-1-frank@...2641...&g= t;
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net= /msg34193.html
Signed-off-by: Gert Doering <gert@...1296...>
--= -
M src/openvpn/init.c
M src/openvpn/init.h
2 files changed, 26 in= sertions(+), 32 deletions(-)

git pull ssh://gerr=
it.openvpn.net:29418/openvpn refs/changes/46/1346/2
diff --git a/sr=
c/openvpn/init.c b/src/openvpn/init.c
index 1bdaf27..8d95d5= c 100644
--- a/src/openvpn/init.c
+++ b/src= /openvpn/init.c
@@ -71,13 +71,13 @@

static bool do_deferred_p2p_ncp(struct context *c);
<= span>

-void
= +static void
c= ontext_clear(struct context *c)
{
CLE= AR(*c);
}

-void
+static void
context_clear_1(struct context *c)
{
CLEAR(c->c1);
@@ -4= 430,32 +4430,9 @@
}

/*<= /span>
- * Initialize a tunnel= instance, handle pre and post-init
- * signal settings.
- */
-void
-init_instance_handle_si= gnals(struct context *c, const struct env_set *env, const unsigned int flag= s)
-{
- pre_init_signal_catch();
= - init_instance(c, env, flags)= ;
- post_init_signal= _catch();
-
<= span style=3D"color: hsl(0, 100%, 40%);">- /*

- * This is done so that signals thrown durin= g
- * initializatio= n can bring us back to
= - * a management hold.
- */
- if (I= S_SIG(c))
- {=
- remap_signal(c);
- uninit_management= _callback();
- }
-}
-
-/*
* Initialize a tunnel instance.
<= span> */

-void<= br>+static void
init_instance(struct context *c, const struct env_set *env, const unsigne= d int flags)

{
const struct options *= options =3D &c->options;
@@ -4745,6 +4722,29 @@
}

/*
+ * Initialize a tunnel instance, handle p= re and post-init
+ * = signal settings.
+ */=
+void
+init_instance_handle_signals(struc= t context *c, const struct env_set *env, const unsigned int flags)
+{
+ pre_init_signal_catch();
+ init_instance(c, env, flags);
+ post_init_signal_ca= tch();
+
+ /*

+ * This is done so that signals thrown du= ring
+ * initiali= zation can bring us back to
+ * a management hold.
+ */
+ if (IS_SIG(c))
= + {
+ remap= _signal(c);
+ = uninit_management_callback();
+ }
+}
+
+/*
* Close a tunnel ins= tance.
*/
void
diff --gi= t a/src/openvpn/init.h b/src/openvpn/init.h
index e89615b..= 97318ec 100644
--- a/src/openvpn/init.h
+++= b/src/openvpn/init.h
@@ -31,10 +31,6 @@
= */
#define BASE_N_EVENTS 5

-void context_clear(struct context *= c);

-
-void context_clear_1(struct context *c)= ;
-
vo= id context_clear_2(struct context *c);

v= oid context_init_1(struct context *c);
@@ -64,8 +60,6 @@
void init_instance_handle_signals(struct context *c, const s= truct env_set *env,
cons= t unsigned int flags);

-void init_instance(struct context *c, const struct env_s= et *env, const unsigned int flags);
-
/**
* Query for private k= ey and auth-user-pass username/passwords.
*/

To view, visit change 1346. To unsubscribe, or for help= writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2b5429841bcd46376241890ace5= 0b82a291b7400
Gerrit-Change-Number: 1346
Gerrit-PatchSet: 2
Gerrit-Owner: ordex <antonio@...2726...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --XhJZgv+dTa0=--