summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2022-02-17 21:23:31 +0100
committerThomas Markwalder <tmark@isc.org>2022-02-17 21:23:31 +0100
commit6c20973385e1d13b887da7c77270e82b10a1624f (patch)
treee8709bcbe4a980a966d3057433b8e52597916bdd
parent[#95] Work around an issue with schema compare script (diff)
downloadkea-6c20973385e1d13b887da7c77270e82b10a1624f.tar.xz
kea-6c20973385e1d13b887da7c77270e82b10a1624f.zip
[#95] Enable installation
src/hooks/dhcp/pgsql_cb/Makefile.am Enable library installation src/hooks/dhcp/pgsql_cb/pgsql_cb_callouts.cc Enable registration
-rw-r--r--src/hooks/dhcp/pgsql_cb/Makefile.am7
-rw-r--r--src/hooks/dhcp/pgsql_cb/pgsql_cb_callouts.cc17
2 files changed, 13 insertions, 11 deletions
diff --git a/src/hooks/dhcp/pgsql_cb/Makefile.am b/src/hooks/dhcp/pgsql_cb/Makefile.am
index bd09ecb872..3dc902934d 100644
--- a/src/hooks/dhcp/pgsql_cb/Makefile.am
+++ b/src/hooks/dhcp/pgsql_cb/Makefile.am
@@ -31,11 +31,8 @@ libpgsqlcb_la_CXXFLAGS = $(AM_CXXFLAGS)
libpgsqlcb_la_CPPFLAGS = $(AM_CPPFLAGS)
# install the shared object into $(libdir)/kea/hooks
-# @todo When we are ready to start installing this hook library,
-# delete the noinst_LTLIBRARIES line, and uncomment the next two lines.
-noinst_LTLIBRARIES += libdhcp_pgsql_cb.la
-#lib_hooksdir = $(libdir)/kea/hooks
-#lib_hooks_LTLIBRARIES = libdhcp_pgsql_cb.la
+lib_hooksdir = $(libdir)/kea/hooks
+lib_hooks_LTLIBRARIES = libdhcp_pgsql_cb.la
libdhcp_pgsql_cb_la_SOURCES =
libdhcp_pgsql_cb_la_LDFLAGS = $(AM_LDFLAGS) $(pgsql_LIBS)
diff --git a/src/hooks/dhcp/pgsql_cb/pgsql_cb_callouts.cc b/src/hooks/dhcp/pgsql_cb/pgsql_cb_callouts.cc
index acf8367dbd..72bcae91b1 100644
--- a/src/hooks/dhcp/pgsql_cb/pgsql_cb_callouts.cc
+++ b/src/hooks/dhcp/pgsql_cb/pgsql_cb_callouts.cc
@@ -13,8 +13,10 @@
#include <hooks/hooks.h>
#include <pgsql_cb_impl.h>
-// #include <pgsql_cb_dhcp4.h> // disabled for now, to be added in #95
-// #include <pgsql_cb_dhcp6.h> // disabled for now, to be added in #96
+#include <pgsql_cb_dhcp4.h>
+
+/// @todo disabled for now, to be added in #96
+/// #include <pgsql_cb_dhcp6.h>
#include <pgsql_cb_log.h>
using namespace isc::cb;
@@ -34,8 +36,10 @@ load(LibraryHandle& /* handle */) {
LOG_INFO(pgsql_cb_logger, PGSQL_CB_INIT_OK);
// Register Postgres CB factories with CB Managers
- //isc::dhcp::PgSqlConfigBackendDHCPv4::registerBackendType(); // disabled for now, to be added in #95
- //isc::dhcp::PgSqlConfigBackendDHCPv6::registerBackendType(); // disabled for now, to be added in #96
+ isc::dhcp::PgSqlConfigBackendDHCPv4::registerBackendType();
+
+ /// @todo disabled for now, to be added in #96
+ ///isc::dhcp::PgSqlConfigBackendDHCPv6::registerBackendType();
return (0);
}
@@ -75,8 +79,9 @@ int
unload() {
LOG_INFO(pgsql_cb_logger, PGSQL_CB_DEINIT_OK);
// Unregister the factories and remove Postgres backends
- //isc::dhcp::PgSqlConfigBackendDHCPv4::unregisterBackendType(); // disabled for now, to be added in #95
- //isc::dhcp::PgSqlConfigBackendDHCPv6::unregisterBackendType(); // disabled for now, to be added in #96
+ isc::dhcp::PgSqlConfigBackendDHCPv4::unregisterBackendType();
+ /// @todo disabled for now, to be added in #96
+ ///isc::dhcp::PgSqlConfigBackendDHCPv6::unregisterBackendType();
return (0);
}