projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
806e39c
)
vconn: Report valid errno value if connection closed waiting for hello.
author
Ben Pfaff
<blp@nicira.com>
Fri, 12 Jun 2009 22:14:42 +0000
(15:14 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Fri, 12 Jun 2009 23:45:28 +0000
(16:45 -0700)
vconn_connect() is defined to return 0 on success or a positive errno
value on failure, but it was possible to get a negative value (EOF). This
commit changes this to ECONNRESET to match caller expectations.
lib/vconn.c
patch
|
blob
|
history
diff --git
a/lib/vconn.c
b/lib/vconn.c
index e4afb22e6642a0885a0836e2c4d3172d8682eb4a..3c4efdbad1454462c8ab8adb8f8d5a2921e118a8 100644
(file)
--- a/
lib/vconn.c
+++ b/
lib/vconn.c
@@
-339,7
+339,7
@@
vcs_recv_hello(struct vconn *vconn)
if (retval != EAGAIN) {
vconn->state = VCS_DISCONNECTED;
- vconn->error = retval;
+ vconn->error = retval
== EOF ? ECONNRESET : retval
;
}
}