]> jfr.im git - irc/atheme/atheme.git/commit
modules/operserv/modmanager: account for an entire list of non-reloadables
authorAaron Jones <redacted>
Sun, 13 Jun 2021 07:59:31 +0000 (07:59 +0000)
committerAaron Jones <redacted>
Sun, 13 Jun 2021 07:59:31 +0000 (07:59 +0000)
commite2fd6f2a8959fb89acb295d6e29a642a1a4e73b1
tree5615fe39bf738117f4b5f1c54e3522cc563776c4
parent83f267240349c90b8176204a512bb4593dab0d71
modules/operserv/modmanager: account for an entire list of non-reloadables

When recursing a given module's reverse dependencies, it is
possible that we run into a permanent module that is depended
upon by a semi-permanent (reload-only) module. This will result
in the reload of that module being skipped (as there is a
permanent module in its reverse dependency chain), but the
mod_recurse_revdeps() function will still set the r_dep pointer
to the semi-permanent one.

We then test if r_dep is set to perform a database save (in case
reloading of the reload-only module fails). However, if our
entire list of modules to reload has recursive non-reloadability
status, we will be saving the database for nothing, as we then
go on to ignore every module in the list.

Exit early if this is the case, avoiding a pointless wallops and
database save.
modules/operserv/modmanager.c