git://git.onelab.eu
/
sliver-openvswitch.git
/ 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
e4afb22
..
3c4efdb
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
;
}
}