From: Willy Tarreau Date: Fri, 11 May 2012 16:38:44 +0000 (+0200) Subject: MINOR: stream_interface: add an init callback to sock_ops X-Git-Tag: v1.5-dev10~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64798bd72051894d2a1dc46257d411a3a99ffb87;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h index 2c57acd318..fb89f50d46 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 7e0d4c9a47..47123628d5 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 9dfda93a29..69db42f240 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,