CLEANUP: connection: split sock_ops into data_ops, app_cp and si_ops
Some parts of the sock_ops structure were only used by the stream
interface and have been moved into si_ops. Some of them were callbacks
to the stream interface from the connection and have been moved into
app_cp as they're the application seen from the connection (later,
health-checks will need to use them). The rest has moved to data_ops.
Normally at this point the connection could live without knowing about
stream interfaces at all.
diff --git a/src/cfgparse.c b/src/cfgparse.c
index ea3b6cf..44397fc 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -266,7 +266,7 @@
l->fd = -1;
l->addr = ss;
- l->sock = &raw_sock;
+ l->data = &raw_sock;
l->state = LI_INIT;
if (ss.ss_family == AF_INET) {
@@ -1275,7 +1275,7 @@
}
newpeer->addr = *sk;
newpeer->proto = protocol_by_family(newpeer->addr.ss_family);
- newpeer->sock = &raw_sock;
+ newpeer->data = &raw_sock;
newpeer->sock_init_arg = NULL;
if (!sk) {
@@ -4093,8 +4093,7 @@
}
newsrv->addr = *sk;
newsrv->proto = protocol_by_family(newsrv->addr.ss_family);
- newsrv->sock = &raw_sock;
- newsrv->sock_init_arg = NULL;
+ newsrv->data = &raw_sock;
if (!sk) {
Alert("parsing [%s:%d] : Unknown protocol family %d '%s'\n",