]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[github35] Changes after first part of the review.
authorTomek Mrugalski <tomasz@isc.org>
Fri, 22 Dec 2017 14:11:23 +0000 (15:11 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Fri, 22 Dec 2017 14:11:23 +0000 (15:11 +0100)
configure.ac
src/bin/agent/Makefile.am
src/hooks/dhcp/lease_cmds/tests/Makefile.am
src/lib/dhcpsrv/cql_exchange.cc
src/lib/dhcpsrv/cql_exchange.h
src/lib/dhcpsrv/db_exceptions.h
src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/dhcpsrv/sql_common.h

index 9fa181da52862e663f5f50aee273725a1d7cbb62..012fac0f49a274165864fe3a82549308ae6da59b 100644 (file)
@@ -728,7 +728,7 @@ if test "$CQL_CONFIG" != "" ; then
 
     CQL_INCLUDEDIR=`$CQL_CONFIG --includedir`
     CQL_CPPFLAGS="`$CQL_CONFIG --cppflags` -I$CQL_INCLUDEDIR"
-    CQL_LIBS="-L`$CQL_CONFIG --libdir` -lcassandra_static -luv"
+    CQL_LIBS="-L`$CQL_CONFIG --libdir` -lcassandra -luv"
     CQL_VERSION=`$CQL_CONFIG --version`
 
     AC_SUBST(CQL_CPPFLAGS)
index e67c5727af5e0627e30df9e1ba8a535cfbeb6a8f..6b346fb15989177264ff857ce9aace83fd4ee1f0 100644 (file)
@@ -88,6 +88,9 @@ kea_ctrl_agent_LDADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS) $(BOOST_LIBS)
 
 kea_ctrl_agent_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS)
 
+if HAVE_CQL
+kea_ctrl_agent_LDFLAGS += $(CQL_LIBS)
+endif
 
 
 if GENERATE_PARSER
index 0e987d2cd662ce6d77918cf9cd42ef6e3918a75b..27a1096e95705c0cb2cb02b055309ce4ca95b0f8 100644 (file)
@@ -53,5 +53,10 @@ lease_cmds_unittests_LDADD += $(LOG4CPLUS_LIBS)
 lease_cmds_unittests_LDADD += $(CRYPTO_LIBS)
 lease_cmds_unittests_LDADD += $(BOOST_LIBS)
 lease_cmds_unittests_LDADD += $(GTEST_LDADD)
+
+if HAVE_CQL
+lease_cmds_unittests_LDFLAGS += $(CQL_LIBS)
+endif
+
 endif
 noinst_PROGRAMS = $(TESTS)
index c6d72bca12339a76943de56f901c74f8e914da78..c45c4ec9219956628beea958f22ccbf684e2a2c1 100644 (file)
 #include <dhcpsrv/db_exceptions.h>
 #include <dhcpsrv/sql_common.h>
 
+#include <boost/multi_index/hashed_index.hpp>
+#include <boost/multi_index/member.hpp>
+#include <boost/multi_index/sequenced_index.hpp>
+#include <boost/multi_index_container.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include <fstream>
+#include <iostream>
+#include <map>
+#include <string>
+#include <utility>
+#include <vector>
+
 namespace isc {
 namespace dhcp {
 
index 837fb015935eee779e91cd74d11b712ce9b2a4b9..798d31995747f42453b8ea62a6fd8591edc63fcb 100644 (file)
@@ -48,7 +48,7 @@ class CqlExchange;
 /// behaviour.
 class AnyArray : public std::vector<boost::any> {
 public:
-    /// @brief Add a at the end of the vector.
+    /// @brief Add a value at the end of the vector.
     void add(const boost::any& value);
 
     /// @brief Remove the void pointer to the data value from a specified
index e6d2eca2877d715ca1c0e7b2093e95ac2a4c525e..efff251d0d1203be73ad59cd02c2f26fd28252d5 100644 (file)
@@ -13,6 +13,10 @@ namespace isc {
 namespace dhcp {
 
 /// @brief Database statement not applied
+///
+/// Cassandra have a concept of mutation (any statement that does change the
+/// data, like INSERT, UPDATE or DELETE. Under certain conditions it may be
+/// possible that those statesments may fail to apply.
 class StatementNotApplied : public Exception {
 public:
     StatementNotApplied(const char* file, size_t line, const char* what)
index 45b4afd3a4f83027e96c77ad06bce4c96ecf70c4..22b66a551996ef2e591eeae5845973731c982b47 100644 (file)
@@ -198,9 +198,6 @@ the Cassandra database. The connection is closed as part of normal server
 shutdown. This error is most likely a programmatic issue that is highly
 unlikely to occur or negatively impact server operation.
 
-% DHCPSRV_CQL_BEGIN_TRANSACTION begin transaction.
-The server has issued a begin transaction call.
-
 % DHCPSRV_CQL_CONNECTION_BEGIN_TRANSACTION begin transaction on current connection.
 The server has issued a begin transaction call.
 
index 3521410658e48b15261f3979b12b74dd5db19663..610abd62e105fc7a344b58d52adada9d69147278 100644 (file)
 #ifndef SQL_COMMON_H
 #define SQL_COMMON_H
 
-#include <boost/multi_index/hashed_index.hpp>
-#include <boost/multi_index/member.hpp>
-#include <boost/multi_index/sequenced_index.hpp>
-#include <boost/multi_index_container.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
-
-#include <fstream>
-#include <iostream>
-#include <map>
-#include <string>
-#include <utility>
-#include <vector>
-
 namespace isc {
 namespace dhcp {
 
@@ -47,8 +33,8 @@ enum ExchangeDataType {
     EXCHANGE_DATA_TYPE_STRING,
     EXCHANGE_DATA_TYPE_BYTES,
     EXCHANGE_DATA_TYPE_UUID,
-    EXCHANGE_DATA_TYPE_UDT,
-    EXCHANGE_DATA_TYPE_COLLECTION
+    EXCHANGE_DATA_TYPE_UDT,       ///< User-Defined Type (used in Cassandra)
+    EXCHANGE_DATA_TYPE_COLLECTION ///< Collection (used in Cassandra)
 };
 
 /// @brief Base class for backend exchanges.