mirror of
https://github.com/weechat/weechat.git
synced 2026-07-01 15:26:37 +02:00
Fix crash when many lua scripts are executing callbacks at same time
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
WeeChat ChangeLog
|
||||
=================
|
||||
Sébastien Helleu <flashcode@flashtux.org>
|
||||
v0.3.5-dev, 2011-02-01
|
||||
v0.3.5-dev, 2011-02-02
|
||||
|
||||
|
||||
Version 0.3.5 (under dev!)
|
||||
@@ -15,6 +15,7 @@ Version 0.3.5 (under dev!)
|
||||
* core: allow background for nick colors (using "/")
|
||||
* irc: add many missing commands for target buffer (options irc.msgbuffer.xxx)
|
||||
(bug #32216)
|
||||
* lua: fix crash when many scripts are executing callbacks at same time
|
||||
* xfer: do not close chat buffers when removing xfer from list (bug #32271)
|
||||
|
||||
Version 0.3.4 (2011-01-16)
|
||||
|
||||
@@ -151,8 +151,10 @@ weechat_lua_exec (struct t_plugin_script *script, int ret_type,
|
||||
{
|
||||
void *ret_value;
|
||||
int argc, i, *ret_i;
|
||||
lua_State *old_lua_current_interpreter;
|
||||
struct t_plugin_script *old_lua_current_script;
|
||||
|
||||
old_lua_current_interpreter = lua_current_interpreter;
|
||||
lua_current_interpreter = script->interpreter;
|
||||
|
||||
lua_getglobal (lua_current_interpreter, function);
|
||||
@@ -191,6 +193,7 @@ weechat_lua_exec (struct t_plugin_script *script, int ret_type,
|
||||
weechat_prefix ("error"), LUA_PLUGIN_NAME,
|
||||
lua_tostring (lua_current_interpreter, -1));
|
||||
lua_current_script = old_lua_current_script;
|
||||
lua_current_interpreter = old_lua_current_interpreter;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -212,10 +215,12 @@ weechat_lua_exec (struct t_plugin_script *script, int ret_type,
|
||||
{
|
||||
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, function);
|
||||
lua_current_script = old_lua_current_script;
|
||||
lua_current_interpreter = old_lua_current_interpreter;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
lua_current_script = old_lua_current_script;
|
||||
lua_current_interpreter = old_lua_current_interpreter;
|
||||
|
||||
return ret_value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user