We should use closesocket() while closing sockets so that
closing sockets work fine on both POSIX and Windows.
(In POSIX, we #define closesocket close)

Without this change, sflow unit tests would cause ovs-vswitchd
to crash in Windows.

Signed-off-by: Gurucharan Shetty <gshe...@nicira.com>
---
 ofproto/collectors.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ofproto/collectors.c b/ofproto/collectors.c
index 770151c..5b29212 100644
--- a/ofproto/collectors.c
+++ b/ofproto/collectors.c
@@ -95,7 +95,7 @@ collectors_destroy(struct collectors *c)
         size_t i;
 
         for (i = 0; i < c->n_fds; i++) {
-            close(c->fds[i]);
+            closesocket(c->fds[i]);
         }
         free(c->fds);
         free(c);
-- 
1.7.9.5

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

Reply via email to