[PATCH v3 2/2] server: Return NULL from get_next_hook when no hook is found.