]> git.ipfire.org Git - people/jschlag/network.git/commit
ports: Don't crash with an assertion error when no hook can be found
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 13 Jun 2017 18:26:08 +0000 (19:26 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 13 Jun 2017 18:28:00 +0000 (19:28 +0100)
commit0c949dd59a783c432d10b19dce7aa1aa0a5b3ffa
tree1e773caf2230071fba7f7a2b193d5a75f6e4d930
parente396e74e2e40c5c6d6c72596bf3a6aa1b6d973f7
ports: Don't crash with an assertion error when no hook can be found

This happens when a device has an empty configuration file or
the HOOK variable is not set for an other reason.

In that case the function make the entire program crash.

This patch changes behaviour in that sense that the function
returns with an error which must be evaluated by the calling
function.

Fixes #11400

Reported-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.ports