From: Alin Serdean Date: Mon, 4 Jan 2016 23:04:10 +0000 (+0000) Subject: netlink-socket: Fix log message for subscribe/unsubscribe on Windows. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=d8d1ef2f07019fa216d61439344c5b84f8a64f22 netlink-socket: Fix log message for subscribe/unsubscribe on Windows. The warning message was inverted on the performed operation. Also use the error returned by nl_sock_subscribe_packet__. Signed-off-by: Alin Gabriel Serdean Signed-off-by: Ben Pfaff --- diff --git a/lib/netlink-socket.c b/lib/netlink-socket.c index 5cf1027b7..5ef4b15d8 100644 --- a/lib/netlink-socket.c +++ b/lib/netlink-socket.c @@ -372,8 +372,8 @@ nl_sock_subscribe_packets(struct nl_sock *sock) error = nl_sock_subscribe_packet__(sock, true); if (error) { - VLOG_WARN("could not unsubscribe packets (%s)", - ovs_strerror(errno)); + VLOG_WARN("could not subscribe packets (%s)", + ovs_strerror(error)); return error; } sock->read_ioctl = OVS_IOCTL_READ_PACKET; @@ -388,8 +388,8 @@ nl_sock_unsubscribe_packets(struct nl_sock *sock) int error = nl_sock_subscribe_packet__(sock, false); if (error) { - VLOG_WARN("could not subscribe to packets (%s)", - ovs_strerror(errno)); + VLOG_WARN("could not unsubscribe to packets (%s)", + ovs_strerror(error)); return error; }