]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1088] addressed review
authorRazvan Becheriu <razvan@isc.org>
Mon, 24 Feb 2020 17:08:30 +0000 (19:08 +0200)
committerRazvan Becheriu <razvan@isc.org>
Thu, 27 Feb 2020 07:03:27 +0000 (09:03 +0200)
src/lib/hooks/hooks_user.dox

index 70388a34b05fbd50b54d51f9f0f45809591e213a..e4a21c03764b00cdacb388fb549d1ab5d00e565d 100644 (file)
@@ -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);