[Openvpn-devel,v1] multi: use multi_io_delete_event() and drop multi_tcp_delete_event()

Message ID 20261104174306.15159-1-gert@greenie.muc.de
State New
Headers
Series [Openvpn-devel,v1] multi: use multi_io_delete_event() and drop multi_tcp_delete_event() |

Commit Message

Gert Doering Nov. 4, 2026, 5:43 p.m. UTC
  From: Razvan Cojocaru <razvanc@mailbox.org>

cbb0440e ("multiproto: move generic event handling code in dedicated
files") added multi_io_delete_event() as a copy of
multi_tcp_delete_event() but kept the old function and its only
caller. Switch management_delete_event() to the new one and remove the
old copy.

Change-Id: Iba1db32cd130d092e34a31159f14d3aa37db96f2
Signed-off-by: Razvan Cojocaru <razvanc@mailbox.org>
Acked-by: Gianmarco De Gregori <gianmarco@mandelbit.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2133
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2133
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Gianmarco De Gregori <gianmarco@mandelbit.com>
  

Patch

diff --git a/src/openvpn/mtcp.c b/src/openvpn/mtcp.c
index 2d0af06..62d059e 100644
--- a/src/openvpn/mtcp.c
+++ b/src/openvpn/mtcp.c
@@ -95,15 +95,6 @@ 
 }
 
 void
-multi_tcp_delete_event(struct multi_io *multi_io, event_t event)
-{
-    if (multi_io && multi_io->es)
-    {
-        event_del(multi_io->es, event);
-    }
-}
-
-void
 multi_tcp_dereference_instance(struct multi_io *multi_io, struct multi_instance *mi)
 {
     const struct link_socket *sock = mi->context.c2.link_sockets[0];
diff --git a/src/openvpn/mtcp.h b/src/openvpn/mtcp.h
index 47c6308..b4ec1f9 100644
--- a/src/openvpn/mtcp.h
+++ b/src/openvpn/mtcp.h
@@ -43,6 +43,4 @@ 
 
 struct multi_instance *multi_create_instance_tcp(struct multi_context *m, struct link_socket *sock);
 
-void multi_tcp_delete_event(struct multi_io *multi_io, event_t event);
-
 #endif /* ifndef MTCP_H */
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index 3f514d6..741b3d1 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -4025,7 +4025,7 @@ 
     struct multi_context *m = (struct multi_context *)arg;
     if (m->multi_io)
     {
-        multi_tcp_delete_event(m->multi_io, event);
+        multi_io_delete_event(m->multi_io, event);
     }
 }