diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-03-23 18:24:47 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-03-23 18:24:47 +0100 |
commit | 9972cce777852c59c4ba3226d52cec83565b1dd9 (patch) | |
tree | ca8e8e67885269a9610fe2eb7d8b508b33a6cfea /src/plugins/scripts/lua | |
parent | 4474f9ca0e7d0eca0edfeae6310594b2436a1b03 (diff) | |
download | weechat-9972cce777852c59c4ba3226d52cec83565b1dd9.zip |
core: add a connection timeout for child process in hook_connect (bug #35966)
Diffstat (limited to 'src/plugins/scripts/lua')
-rw-r--r-- | src/plugins/scripts/lua/weechat-lua-api.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c index 908c218a7..29e7a794a 100644 --- a/src/plugins/scripts/lua/weechat-lua-api.c +++ b/src/plugins/scripts/lua/weechat-lua-api.c @@ -6131,6 +6131,16 @@ weechat_lua_api_constant_weechat_hook_connect_memory_error (lua_State *L) } static int +weechat_lua_api_constant_weechat_hook_connect_timeout (lua_State *L) +{ + /* make C compiler happy */ + (void) L; + + lua_pushnumber (lua_current_interpreter, WEECHAT_HOOK_CONNECT_TIMEOUT); + return 1; +} + +static int weechat_lua_api_constant_weechat_hook_signal_string (lua_State *L) { /* make C compiler happy */ @@ -6389,6 +6399,7 @@ const struct luaL_reg weechat_lua_api_funcs[] = { { "WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR", &weechat_lua_api_constant_weechat_hook_connect_gnutls_init_error }, { "WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR", &weechat_lua_api_constant_weechat_hook_connect_gnutls_handshake_error }, { "WEECHAT_HOOK_CONNECT_MEMORY_ERROR", &weechat_lua_api_constant_weechat_hook_connect_memory_error }, + { "WEECHAT_HOOK_CONNECT_TIMEOUT", &weechat_lua_api_constant_weechat_hook_connect_timeout }, { "WEECHAT_HOOK_SIGNAL_STRING", &weechat_lua_api_constant_weechat_hook_signal_string }, { "WEECHAT_HOOK_SIGNAL_INT", &weechat_lua_api_constant_weechat_hook_signal_int }, |