Some ovsdb-tool related unit tests fail with bad checksum errors
while reading transactions from database. It is most likely because
of the CR at the end of line. Using binary mode solves the problem.

Signed-off-by: Gurucharan Shetty <gshe...@nicira.com>
---
 ovsdb/log.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/ovsdb/log.c b/ovsdb/log.c
index 48fa847..1e4c75e 100644
--- a/ovsdb/log.c
+++ b/ovsdb/log.c
@@ -108,6 +108,9 @@ ovsdb_log_open(const char *name, enum ovsdb_log_open_mode 
open_mode,
     } else {
         OVS_NOT_REACHED();
     }
+#ifdef _WIN32
+    flags = flags | O_BINARY;
+#endif
     fd = open(name, flags, 0666);
     if (fd < 0) {
         const char *op = open_mode == OVSDB_LOG_CREATE ? "create" : "open";
-- 
1.7.9.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to