]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stream_interface: add an init callback to sock_ops
authorWilly Tarreau <w@1wt.eu>
Fri, 11 May 2012 16:38:44 +0000 (18:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 11 May 2012 16:39:26 +0000 (18:39 +0200)
This will be needed for some socket layers such as SSL. It's not used
at the moment.

include/types/stream_interface.h
src/sock_raw.c
src/stream_interface.c

index 2c57acd318cb7c2fd0fe0bac20717b1025ba46ac..fb89f50d46462652144de3508a276f69e525e990 100644 (file)
@@ -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 */
index 7e0d4c9a477b4d53fb5ee22c2983f170c68a55eb..47123628d53df3a54832cd020889ab09d15cec00 100644 (file)
@@ -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,
index 9dfda93a29511e5bba16e0b5276ef1d32beaabd2..69db42f240239f03cf0e676ae8b2a6221fa6f281 100644 (file)
@@ -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,