fix: connecting to a non-existing port on switch returns error#58
fix: connecting to a non-existing port on switch returns error#58rd235 merged 1 commit intovirtualsquare:masterfrom
Conversation
|
I see that there it is some confusion on coding style (e.g. curly brackets and LFTM. |
| } | ||
| else { | ||
| remove_fd(fd); | ||
| } else { |
There was a problem hiding this comment.
For instance, this else branch modification is not necessary.
There was a problem hiding this comment.
I should do something like this?
}
else {
So this apply to the other if statements too? So from this:
if () {
} else {
remove_fd(fd);
}
to this
if () {
}
else {
remove_fd(fd);
}
There was a problem hiding this comment.
Also I've just notice that the else if statement on line 252 is in the wrong format, right?
There was a problem hiding this comment.
Yes, I think it would be better to refactor the project in future with a consistent coding style (for instance the Linux one).
It is not relevant for this pr.
There was a problem hiding this comment.
Ok, makes sense. Code formatters are made for this :)
I have found a bug where if you try to connect to a port on the switch that does not exists the connection will hang. To reproduce the bug:
vde_switch /tmp/sw1vdens '/tmp/sw1[33]'This patch should fix the bug. After this if you try to connect to a non-existing port the
error message
vdeplug: No such file or directoryis returned.