From: Tomek Mrugalski Date: Mon, 16 Nov 2015 20:19:03 +0000 (+0100) Subject: [3682] Oops, reverting part of the last commit. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5deb3d766030f3cd38442e69ff7bb3e563aa7f7;p=thirdparty%2Fkea.git [3682] Oops, reverting part of the last commit. It was a leftover from debugging a simplified query. --- diff --git a/src/lib/dhcpsrv/mysql_host_data_source.cc b/src/lib/dhcpsrv/mysql_host_data_source.cc index cc864b17c3..abeec6d8a4 100644 --- a/src/lib/dhcpsrv/mysql_host_data_source.cc +++ b/src/lib/dhcpsrv/mysql_host_data_source.cc @@ -791,20 +791,20 @@ MySqlHostDataSource::get4(const SubnetID& subnet_id, // HW Address const vector& hwaddr_vector = hwaddr->hwaddr_; length = hwaddr_vector.size(); - inbind[0].buffer_type = MYSQL_TYPE_BLOB; - inbind[0].buffer = reinterpret_cast + inbind[1].buffer_type = MYSQL_TYPE_BLOB; + inbind[1].buffer = reinterpret_cast (const_cast(&hwaddr_vector[0])); - inbind[0].buffer_length = length; - inbind[0].length = &length; + inbind[1].buffer_length = length; + inbind[1].length = &length; } else if (duid) { // DUID const vector& duid_vector = duid->getDuid(); length = duid_vector.size(); - inbind[0].buffer_type = MYSQL_TYPE_BLOB; - inbind[0].buffer = reinterpret_cast + inbind[1].buffer_type = MYSQL_TYPE_BLOB; + inbind[1].buffer = reinterpret_cast (const_cast(&duid_vector[0])); - inbind[0].buffer_length = length; - inbind[0].length = &length; + inbind[1].buffer_length = length; + inbind[1].length = &length; } // if none of the identifiers was given, this field should remain null