X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fvconn.c;h=9271f4f155e93699ade8f5be7520ef495f4ffd22;hb=b546a4f73828e30186e2e5423eb70ed7f2347306;hp=eb848ba827c858644652e0c1c77da812a270b82b;hpb=48d84b1706f76882bc5265c09257e70899fb9c41;p=openvswitch diff --git a/lib/vconn.c b/lib/vconn.c index eb848ba8..9271f4f1 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -138,10 +138,10 @@ vconn_usage(bool active, bool passive, bool bootstrap OVS_UNUSED) printf("\n"); if (active) { printf("Active OpenFlow connection methods:\n"); - printf(" tcp:IP[:PORT] " + printf(" tcp:IP[:PORT] " "PORT (default: %d) at remote IP\n", OFP_TCP_PORT); #ifdef HAVE_OPENSSL - printf(" ssl:IP[:PORT] " + printf(" ssl:IP[:PORT] " "SSL PORT (default: %d) at remote IP\n", OFP_SSL_PORT); #endif printf(" unix:FILE Unix domain socket named FILE\n"); @@ -368,10 +368,10 @@ vconn_get_local_port(const struct vconn *vconn) * * A vconn that has successfully connected (that is, vconn_connect() or * vconn_send() or vconn_recv() has returned 0) always negotiated a version. */ -enum ofp_version +int vconn_get_version(const struct vconn *vconn) { - return vconn->version; + return vconn->version ? vconn->version : -1; } static void