Преглед изворни кода

Fix to spir_test.cpp

Calling client.query() twice per iteration used 2x the needed number of preprocessed queries.
Ian Goldberg пре 2 година
родитељ
комит
f69c1461ae
1 измењених фајлова са 1 додато и 1 уклоњено
  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));