@@ -93,9 +93,9 @@ _construct_multitransport_with_tls_factory(TransportMapperInet *self, gint fd)
93
93
}
94
94
95
95
static LogTransport *
96
- _construct_tls_transport (TransportMapperInet * self , gint fd )
96
+ _construct_tls_or_multi_transport (TransportMapperInet * self , gboolean create_multi_transport , gint fd )
97
97
{
98
- if (self -> super . create_multitransport )
98
+ if (create_multi_transport )
99
99
return _construct_multitransport_with_tls_factory (self , fd );
100
100
101
101
TLSSession * tls_session = tls_context_setup_session (self -> tls_context );
@@ -127,9 +127,9 @@ _construct_multitransport_with_plain_and_tls_factories(TransportMapperInet *self
127
127
}
128
128
129
129
static LogTransport *
130
- _construct_plain_tcp_transport (TransportMapperInet * self , gint fd )
130
+ _construct_plain_tcp_or_multi_transport (TransportMapperInet * self , gboolean create_multi_transport , gint fd )
131
131
{
132
- if (self -> super . create_multitransport )
132
+ if (create_multi_transport )
133
133
return _construct_multitransport_with_plain_tcp_factory (self , fd );
134
134
135
135
if (self -> super .sock_type == SOCK_DGRAM )
@@ -143,25 +143,25 @@ transport_mapper_inet_construct_log_transport(TransportMapper *s, gint fd)
143
143
{
144
144
TransportMapperInet * self = (TransportMapperInet * ) s ;
145
145
146
- gboolean is_multi = FALSE;
146
+ gboolean proxy_should_switch_transport = FALSE;
147
147
LogTransport * transport = NULL ;
148
148
149
149
if (self -> tls_context && _is_tls_required (self ))
150
150
{
151
- transport = _construct_tls_transport (self , fd );
151
+ transport = _construct_tls_or_multi_transport (self , self -> super . create_multitransport , fd );
152
152
}
153
153
else if (self -> tls_context )
154
154
{
155
- is_multi = TRUE;
155
+ proxy_should_switch_transport = TRUE;
156
156
transport = _construct_multitransport_with_plain_and_tls_factories (self , fd );
157
157
}
158
158
else
159
159
{
160
- transport = _construct_plain_tcp_transport (self , fd );
160
+ transport = _construct_plain_tcp_or_multi_transport (self , self -> super . create_multitransport , fd );
161
161
}
162
162
163
163
if (self -> proxied )
164
- log_transport_socket_proxy_new (transport , is_multi );
164
+ log_transport_socket_proxy_new (transport , proxy_should_switch_transport );
165
165
166
166
return transport ;
167
167
}
@@ -411,7 +411,7 @@ transport_mapper_network_apply_transport(TransportMapper *s, GlobalConfig *cfg)
411
411
self -> super .sock_type = SOCK_STREAM ;
412
412
self -> super .sock_proto = IPPROTO_TCP ;
413
413
self -> proxied = TRUE;
414
- self -> super .transport_name = g_strdup ("rfc3164+proxied-tcp" ); // ???
414
+ self -> super .transport_name = g_strdup ("rfc3164+proxied-tcp" );
415
415
}
416
416
else if (strcasecmp (transport , "tls" ) == 0 )
417
417
{
@@ -437,7 +437,7 @@ transport_mapper_network_apply_transport(TransportMapper *s, GlobalConfig *cfg)
437
437
self -> super .sock_proto = IPPROTO_TCP ;
438
438
self -> proxied = TRUE;
439
439
self -> allow_tls = TRUE;
440
- self -> super .transport_name = g_strdup ("rfc3164+proxied-tls-passthrough" ); // ???
440
+ self -> super .transport_name = g_strdup ("rfc3164+proxied-tls-passthrough" );
441
441
}
442
442
else
443
443
{
@@ -510,7 +510,7 @@ transport_mapper_syslog_apply_transport(TransportMapper *s, GlobalConfig *cfg)
510
510
self -> super .sock_type = SOCK_STREAM ;
511
511
self -> super .sock_proto = IPPROTO_TCP ;
512
512
self -> proxied = TRUE;
513
- self -> super .transport_name = g_strdup ("rfc6587+proxied-tcp" ); // ???
513
+ self -> super .transport_name = g_strdup ("rfc6587+proxied-tcp" );
514
514
}
515
515
else if (strcasecmp (transport , "tls" ) == 0 )
516
516
{
@@ -536,7 +536,7 @@ transport_mapper_syslog_apply_transport(TransportMapper *s, GlobalConfig *cfg)
536
536
self -> super .sock_proto = IPPROTO_TCP ;
537
537
self -> proxied = TRUE;
538
538
self -> require_tls = TRUE;
539
- self -> super .transport_name = g_strdup ("rfc5424+proxied-tls" ); // ???
539
+ self -> super .transport_name = g_strdup ("rfc5424+proxied-tls" );
540
540
}
541
541
else if (strcasecmp (transport , "proxied-tls-passthrough" ) == 0 )
542
542
{
@@ -546,7 +546,7 @@ transport_mapper_syslog_apply_transport(TransportMapper *s, GlobalConfig *cfg)
546
546
self -> super .sock_proto = IPPROTO_TCP ;
547
547
self -> proxied = TRUE;
548
548
self -> allow_tls = TRUE;
549
- self -> super .transport_name = g_strdup ("rfc5424+proxied-tls-passthrough" ); // ???
549
+ self -> super .transport_name = g_strdup ("rfc5424+proxied-tls-passthrough" );
550
550
}
551
551
else
552
552
{
0 commit comments