tests: Port test-sflow and test-netflow to Windows.
[cascardo/ovs.git] / tests / test-netflow.c
index 1243f83..76f9bae 100644 (file)
@@ -181,6 +181,7 @@ test_netflow_main(int argc, char *argv[])
 
     proctitle_init(argc, argv);
     set_program_name(argv[0]);
+    service_start(&argc, &argv);
     parse_options(argc, argv);
 
     if (argc - optind != 1) {
@@ -214,7 +215,7 @@ test_netflow_main(int argc, char *argv[])
 
         ofpbuf_clear(&buf);
         do {
-            retval = read(sock, ofpbuf_data(&buf), buf.allocated);
+            retval = recv(sock, ofpbuf_data(&buf), buf.allocated, 0);
         } while (retval < 0 && errno == EINTR);
         if (retval > 0) {
             ofpbuf_put_uninit(&buf, retval);