变更tfe_stream.h中的部分公用结构体定义。
This commit is contained in:
@@ -126,14 +126,14 @@ void __kni_event_cb(evutil_socket_t fd, short what, void * user)
|
||||
|
||||
assert(__tlv_info->type == KNI_TLV_TYPE_PRO);
|
||||
|
||||
enum tfe_session_proto __session_proto;
|
||||
enum tfe_stream_proto __session_proto;
|
||||
if (__tlv_info->value == KNI_TLV_VALUE_HTTP)
|
||||
{
|
||||
__session_proto = SESSION_PROTO_PLAIN;
|
||||
__session_proto = STREAM_PROTO_PLAIN;
|
||||
}
|
||||
else if (__tlv_info->value == KNI_TLV_VALUE_SSL)
|
||||
{
|
||||
__session_proto = SESSION_PROTO_SSL;
|
||||
__session_proto = STREAM_PROTO_SSL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -73,7 +73,7 @@ int tfe_proxy_fds_accept(struct tfe_proxy * ctx, const struct tfe_proxy_accept_p
|
||||
if (para->passthrough || ctx->tcp_all_passthrough)
|
||||
{
|
||||
bool __true = true;
|
||||
enum tfe_session_proto __session_type = SESSION_PROTO_PLAIN;
|
||||
enum tfe_stream_proto __session_type = STREAM_PROTO_PLAIN;
|
||||
|
||||
tfe_stream_option_set(stream, TFE_STREAM_OPT_PASSTHROUGH, &__true, sizeof(__true));
|
||||
tfe_stream_option_set(stream, TFE_STREAM_OPT_SESSION_TYPE, &__session_type, sizeof(__session_type));
|
||||
|
||||
@@ -60,7 +60,7 @@ static inline enum tfe_conn_dir __BEV_DIR(struct tfe_stream_private * _stream, s
|
||||
|
||||
static inline bool __IS_SSL(struct tfe_stream_private * _stream)
|
||||
{
|
||||
return (_stream->session_type == SESSION_PROTO_SSL);
|
||||
return (_stream->session_type == STREAM_PROTO_SSL);
|
||||
}
|
||||
|
||||
void tfe_stream_detach(const struct tfe_stream * stream)
|
||||
@@ -601,7 +601,7 @@ void tfe_stream_init_by_fds(struct tfe_stream * stream, evutil_socket_t fd_downs
|
||||
evutil_make_socket_nonblocking(fd_downstream);
|
||||
evutil_make_socket_nonblocking(fd_upstream);
|
||||
|
||||
if (_stream->session_type == SESSION_PROTO_PLAIN)
|
||||
if (_stream->session_type == STREAM_PROTO_PLAIN)
|
||||
{
|
||||
_stream->conn_downstream = __conn_private_create(_stream, fd_downstream);
|
||||
_stream->conn_upstream = __conn_private_create(_stream, fd_upstream);
|
||||
@@ -613,7 +613,7 @@ void tfe_stream_init_by_fds(struct tfe_stream * stream, evutil_socket_t fd_downs
|
||||
__conn_private_enable(_stream->conn_upstream);
|
||||
}
|
||||
|
||||
if (_stream->session_type == SESSION_PROTO_SSL)
|
||||
if (_stream->session_type == STREAM_PROTO_SSL)
|
||||
{
|
||||
_stream->ssl_mgr = _stream->proxy_ref->ssl_mgr_handler;
|
||||
|
||||
@@ -635,8 +635,8 @@ int tfe_stream_option_set(struct tfe_stream * stream, enum tfe_stream_option opt
|
||||
|
||||
if (opt == TFE_STREAM_OPT_SESSION_TYPE)
|
||||
{
|
||||
assert(sz_arg == sizeof(enum tfe_session_proto));
|
||||
_stream->session_type = *(enum tfe_session_proto *)arg;
|
||||
assert(sz_arg == sizeof(enum tfe_stream_proto));
|
||||
_stream->session_type = *(enum tfe_stream_proto *)arg;
|
||||
}
|
||||
else if (opt == TFE_STREAM_OPT_PASSTHROUGH)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user