]> jfr.im git - irc/charybdis-ircd/charybdis.git/commit
MODRESTART: Defer restart to the event loop
authorAaron Jones <redacted>
Wed, 28 Dec 2016 20:15:39 +0000 (20:15 +0000)
committerAaron Jones <redacted>
Wed, 28 Dec 2016 20:15:39 +0000 (20:15 +0000)
commitdb05a362105840d502fbff26fc3f3de128c7215c
tree0b40e486eb698047f71e3ca668b003b53768bdc6
parent9cdd7270f989ceebaf9259079663e3b9c42e8c37
MODRESTART: Defer restart to the event loop

When a remote MODRESTART command is received, it will pass through the
ENCAP module. The ms_encap function is responsible for dispatching the
command handler and then the modules will eventually be reloaded.

However, if the ENCAP module is reloaded to a different address, the
stack now contains the address of a function that no longer exists.

Return immediately from the command handler and have the event loop
call the function responsible for reloading the modules instead.

Reported-by: mniip (Freenode)
src/modules.c