Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Water-Melon committed Apr 16, 2024
1 parent bd19b6b commit a18b8da
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
8 changes: 1 addition & 7 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ else
ngx_lua_loc="$NGX_LUA_LOC"
fi

if [ -z "$NGX_STREAM_LUA_LOC" ]; then
ngx_stream_lua_loc="../ngx_stream_lua-*"
else
ngx_stream_lua_loc="$NGX_STREAM_LUA_LOC"
fi

ngx_module_incs="$ngx_addon_dir/src $ngx_lua_loc/src $ngx_stream_lua_loc/src"
ngx_module_incs="$ngx_addon_dir/src $ngx_lua_loc/src"

. auto/module

Expand Down
3 changes: 2 additions & 1 deletion lualib/resty/kong/tls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ local type = type
local error = error
local tostring = tostring
local C = ffi.C
local cast = ffi.cast
local SOCKET_CTX_INDEX = 1
local ffi_string = ffi.string
local get_string_buf = base.get_string_buf
Expand Down Expand Up @@ -146,7 +147,7 @@ function _M.get_ssl_pointer(sock)
return nil, "no ssl object"
end

return ffi.cast(ssl_type, void_pp[0])
return cast(ssl_type, void_pp[0])
end


Expand Down
4 changes: 1 addition & 3 deletions src/ngx_http_lua_kong_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ ngx_http_lua_kong_ffi_get_socket_ssl(ngx_http_lua_socket_tcp_upstream_t *u, void
return NGX_ABORT;
}

if (uc && (uc->ssl) &&
(uc->ssl->connection)) {

if (uc && (uc->ssl) && (uc->ssl->connection)) {
*ssl_conn = uc->ssl->connection;
return NGX_OK;
}
Expand Down
8 changes: 8 additions & 0 deletions stream/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ ngx_module_name=ngx_stream_lua_kong_module
ngx_module_srcs="$ngx_addon_dir/src/ngx_stream_lua_kong_module.c"
ngx_module_incs="$ngx_addon_dir/src"

if [ -z "$NGX_LUA_LOC" ]; then
ngx_lua_loc="../ngx_stream_lua-*"
else
ngx_lua_loc="$NGX_LUA_LOC"
fi

ngx_module_incs="$ngx_addon_dir/src $ngx_lua_loc/src"

. auto/module

ngx_addon_name=$ngx_module_name
Expand Down
4 changes: 1 addition & 3 deletions stream/src/ngx_stream_lua_kong_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,7 @@ void **ssl_conn)
return NGX_ABORT;
}

if (uc && (uc->ssl) &&
(uc->ssl->connection)) {

if (uc && (uc->ssl) && (uc->ssl->connection)) {
*ssl_conn = uc->ssl->connection;
return NGX_OK;
}
Expand Down

0 comments on commit a18b8da

Please sign in to comment.