File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ local getfenv = getfenv
11
11
local error = error
12
12
local errmsg = base .get_errmsg_ptr ()
13
13
local get_string_buf = base .get_string_buf
14
+ local FFI_ERROR = base .FFI_ERROR
14
15
15
16
16
17
ffi .cdef [[
@@ -51,7 +52,7 @@ function _M.get_serialized_session()
51
52
52
53
local rc = C .ngx_http_lua_ffi_ssl_get_serialized_session (r , buf , errmsg )
53
54
54
- if rc < 0 then
55
+ if rc == FFI_ERROR then
55
56
return nil , ffi_str (errmsg [0 ])
56
57
end
57
58
@@ -76,7 +77,7 @@ function _M.get_session_id()
76
77
77
78
local rc = C .ngx_http_lua_ffi_ssl_get_session_id (r , buf , errmsg )
78
79
79
- if rc < 0 then
80
+ if rc == FFI_ERROR then
80
81
return nil , ffi_str (errmsg [0 ])
81
82
end
82
83
@@ -93,7 +94,7 @@ function _M.set_serialized_session(sess)
93
94
94
95
local rc = C .ngx_http_lua_ffi_ssl_set_serialized_session (r , sess , # sess ,
95
96
errmsg )
96
- if rc < 0 then
97
+ if rc == FFI_ERROR then
97
98
return nil , ffi_str (errmsg [0 ])
98
99
end
99
100
You can’t perform that action at this time.
0 commit comments