Browse Source

[master] Second merge of branch 'trac3084'

By mistake, the previous merge was missing the changes which addressed
review comments.
Marcin Siodelski 11 years ago
parent
commit
5420c8bb51
2 changed files with 8 additions and 2 deletions
  1. 1 0
      src/lib/dhcp_ddns/Makefile.am
  2. 7 2
      src/lib/dhcpsrv/mysql_lease_mgr.cc

+ 1 - 0
src/lib/dhcp_ddns/Makefile.am

@@ -39,6 +39,7 @@ libb10_dhcp_ddns_la_CPPFLAGS = $(AM_CPPFLAGS) $(LOG4CPLUS_INCLUDES)
 libb10_dhcp_ddns_la_LDFLAGS  = $(AM_LDFLAGS)
 libb10_dhcp_ddns_la_LDFLAGS  = $(AM_LDFLAGS)
 libb10_dhcp_ddns_la_LDFLAGS += ${BOTAN_LDFLAGS}
 libb10_dhcp_ddns_la_LDFLAGS += ${BOTAN_LDFLAGS}
 libb10_dhcp_ddns_la_LIBADD  =
 libb10_dhcp_ddns_la_LIBADD  =
+libb10_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/cc/libb10-cc.la
 libb10_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/cryptolink/libb10-cryptolink.la
 libb10_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/cryptolink/libb10-cryptolink.la
 libb10_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/dhcp/libb10-dhcp++.la
 libb10_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/dhcp/libb10-dhcp++.la
 libb10_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/log/libb10-log.la
 libb10_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/log/libb10-log.la

+ 7 - 2
src/lib/dhcpsrv/mysql_lease_mgr.cc

@@ -300,9 +300,11 @@ public:
     ///
     ///
     /// The initialization of the variables here is only to satisfy cppcheck -
     /// The initialization of the variables here is only to satisfy cppcheck -
     /// all variables are initialized/set in the methods before they are used.
     /// all variables are initialized/set in the methods before they are used.
-    MySqlLease4Exchange() : addr4_(0), hwaddr_length_(0), client_id_length_(0) {
+    MySqlLease4Exchange() : addr4_(0), hwaddr_length_(0), client_id_length_(0),
+                            fqdn_fwd_(false), fqdn_rev_(false), hostname_length_(0) {
         memset(hwaddr_buffer_, 0, sizeof(hwaddr_buffer_));
         memset(hwaddr_buffer_, 0, sizeof(hwaddr_buffer_));
         memset(client_id_buffer_, 0, sizeof(client_id_buffer_));
         memset(client_id_buffer_, 0, sizeof(client_id_buffer_));
+        memset(hostname_buffer_, 0, sizeof(hostname_buffer_));
         std::fill(&error_[0], &error_[LEASE_COLUMNS], MLM_FALSE);
         std::fill(&error_[0], &error_[LEASE_COLUMNS], MLM_FALSE);
 
 
         // Set the column names (for error messages)
         // Set the column names (for error messages)
@@ -649,9 +651,12 @@ public:
     ///
     ///
     /// The initialization of the variables here is nonly to satisfy cppcheck -
     /// The initialization of the variables here is nonly to satisfy cppcheck -
     /// all variables are initialized/set in the methods before they are used.
     /// all variables are initialized/set in the methods before they are used.
-    MySqlLease6Exchange() : addr6_length_(0), duid_length_(0) {
+    MySqlLease6Exchange() : addr6_length_(0), duid_length_(0),
+                            fqdn_fwd_(false), fqdn_rev_(false),
+                            hostname_length_(0) {
         memset(addr6_buffer_, 0, sizeof(addr6_buffer_));
         memset(addr6_buffer_, 0, sizeof(addr6_buffer_));
         memset(duid_buffer_, 0, sizeof(duid_buffer_));
         memset(duid_buffer_, 0, sizeof(duid_buffer_));
+        memset(hostname_buffer_, 0, sizeof(hostname_buffer_));
         std::fill(&error_[0], &error_[LEASE_COLUMNS], MLM_FALSE);
         std::fill(&error_[0], &error_[LEASE_COLUMNS], MLM_FALSE);
 
 
         // Set the column names (for error messages)
         // Set the column names (for error messages)