[PATCH 1/2] server: Fix get_next_hook return value when no hook is found.