From 64798bd72051894d2a1dc46257d411a3a99ffb87 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 11 May 2012 18:38:44 +0200 Subject: [PATCH] MINOR: stream_interface: add an init callback to sock_ops This will be needed for some socket layers such as SSL. It's not used at the moment. --- include/types/stream_interface.h | 1 + src/sock_raw.c | 1 + src/stream_interface.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h index 2c57acd31..fb89f50d4 100644 --- a/include/types/stream_interface.h +++ b/include/types/stream_interface.h @@ -106,6 +106,7 @@ struct target { }; struct sock_ops { + int (*init)(struct stream_interface *, void *); /* init function */ void (*update)(struct stream_interface *); /* I/O update function */ void (*shutr)(struct stream_interface *); /* shutr function */ void (*shutw)(struct stream_interface *); /* shutw function */ diff --git a/src/sock_raw.c b/src/sock_raw.c index 7e0d4c9a4..47123628d 100644 --- a/src/sock_raw.c +++ b/src/sock_raw.c @@ -1151,6 +1151,7 @@ static void sock_raw_chk_snd(struct stream_interface *si) /* stream sock operations */ struct sock_ops sock_raw = { + .init = NULL, .update = sock_raw_data_finish, .shutr = sock_raw_shutr, .shutw = sock_raw_shutw, diff --git a/src/stream_interface.c b/src/stream_interface.c index 9dfda93a2..69db42f24 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -42,6 +42,7 @@ static void stream_int_chk_snd(struct stream_interface *si); /* socket operations for embedded tasks */ struct sock_ops stream_int_embedded = { + .init = NULL, .update = stream_int_update_embedded, .shutr = stream_int_shutr, .shutw = stream_int_shutw, @@ -53,6 +54,7 @@ struct sock_ops stream_int_embedded = { /* socket operations for external tasks */ struct sock_ops stream_int_task = { + .init = NULL, .update = stream_int_update, .shutr = stream_int_shutr, .shutw = stream_int_shutw,