From: Razvan Becheriu Date: Mon, 24 Feb 2020 17:08:30 +0000 (+0200) Subject: [#1088] addressed review X-Git-Tag: Kea-1.7.6~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ebc7aac1d2c56af517736f116a8ecfe285fce41;p=thirdparty%2Fkea.git [#1088] addressed review --- diff --git a/src/lib/hooks/hooks_user.dox b/src/lib/hooks/hooks_user.dox index 70388a34b0..e4a21c0376 100644 --- a/src/lib/hooks/hooks_user.dox +++ b/src/lib/hooks/hooks_user.dox @@ -526,7 +526,15 @@ throw exceptions in such cases because they need to perform specific actions bef pack/unpack (eg. addOption/delOption before pack action), which have no effect if pack/unpack action is done previously by some other library. -As stated before, the order of loading libraries is crucial in achieving the +@code +// Check the status state. +auto status = handle.getStatus(); +if (status == CalloutHandle::NEXT_STEP_SKIP) { + isc_throw(InvalidOperation, "packet pack already handled"); +} +@endcode + +As stated before, the order of loading libraries is critical in achieving the desired behavior, so please read @ref hooksdgMultipleLibraries when configuring multiple libraries. @@ -559,7 +567,6 @@ if (skip) { with this: @code - // This is the default. handle.setStatus(CalloutHandle::NEXT_STEP_CONTINUE);