Browse Source

Fix to spir_test.cpp

Calling client.query() twice per iteration used 2x the needed number of preprocessed queries.
Ian Goldberg 2 years ago
parent
commit
f69c1461ae
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cpir-read/cxx/spir_test.cpp

+ 1 - 1
cpir-read/cxx/spir_test.cpp

@@ -257,7 +257,7 @@ int main(int argc, char **argv)
 
         string query_msg = client.query(idx);
         boost::asio::write(sockets_[0], boost::asio::buffer(query_msg));
-        string query_msg_recv = client.query(idx);
+        string query_msg_recv(query_msg.length(), '\0');
         boost::asio::read(sockets_[0], boost::asio::buffer(query_msg_recv));