summaryrefslogtreecommitdiffstats
path: root/src/lib/hooks/callout_handle.h
diff options
context:
space:
mode:
authorStephen Morris <stephen@isc.org>2013-09-04 13:13:01 +0200
committerStephen Morris <stephen@isc.org>2013-09-04 13:13:01 +0200
commit91eca98edcc0af04cbfa27cb684dd3ed680565b9 (patch)
tree8327c75d53efb1dfc9101f8b90934ab6cf5c341f /src/lib/hooks/callout_handle.h
parent[3113] Fix hooks unit test failures when --enable-static-link is used. (diff)
downloadkea-91eca98edcc0af04cbfa27cb684dd3ed680565b9.tar.xz
kea-91eca98edcc0af04cbfa27cb684dd3ed680565b9.zip
[3113_test] Fix issues raised by static linking
This fix: * Ensures the user library accesses the correct ServerHooks singleton object. * Provides a way to initialize the BIND 10 logging framework in the context of the user-written hooks library.
Diffstat (limited to 'src/lib/hooks/callout_handle.h')
-rw-r--r--src/lib/hooks/callout_handle.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/hooks/callout_handle.h b/src/lib/hooks/callout_handle.h
index eb57fd46a7..91d7f23fca 100644
--- a/src/lib/hooks/callout_handle.h
+++ b/src/lib/hooks/callout_handle.h
@@ -28,6 +28,8 @@
namespace isc {
namespace hooks {
+class ServerHooks;
+
/// @brief No such argument
///
/// Thrown if an attempt is made access an argument that does not exist.
@@ -369,6 +371,11 @@ private:
/// Callout manager.
boost::shared_ptr<CalloutManager> manager_;
+ /// Reference to the singleton ServerHooks object. See the
+ /// @ref hooksmgMaintenanceGuide for information as to why the class holds
+ /// a reference instead of accessing the singleton within the code.
+ ServerHooks& server_hooks_;
+
/// "Skip" flag, indicating if the caller should bypass remaining callouts.
bool skip_;
};