瀏覽代碼

Fix to spir_test.cpp

Calling client.query() twice per iteration used 2x the needed number of preprocessed queries.
Ian Goldberg 2 年之前
父節點
當前提交
80d0a48387
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      cpir-read/cxx/spir_test.cpp

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

@@ -254,7 +254,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));