X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fvconn-stream.c;h=b38c568686362b90d18bcf343b299d0c039be0dc;hb=3b135da329687c69d3a0f1689621f75cc4888d6f;hp=a9fcd98df621643215b1c831eb15f9a0dcef3d10;hpb=a14bc59fb8f27db193d74662dc9c5cb8237177ef;p=openvswitch diff --git a/lib/vconn-stream.c b/lib/vconn-stream.c index a9fcd98d..b38c5686 100644 --- a/lib/vconn-stream.c +++ b/lib/vconn-stream.c @@ -54,13 +54,13 @@ static void stream_clear_txbuf(struct stream_vconn *); int new_stream_vconn(const char *name, int fd, int connect_status, - uint32_t ip, bool reconnectable, struct vconn **vconnp) + bool reconnectable, struct vconn **vconnp) { struct stream_vconn *s; s = xmalloc(sizeof *s); - vconn_init(&s->vconn, &stream_vconn_class, connect_status, ip, name, - reconnectable); + vconn_init(&s->vconn, &stream_vconn_class, connect_status, + name, reconnectable); s->fd = fd; s->txbuf = NULL; s->tx_waiter = NULL; @@ -270,23 +270,7 @@ new_pstream_pvconn(const char *name, int fd, size_t sa_len, struct vconn **), struct pvconn **pvconnp) { - struct pstream_pvconn *ps; - int retval; - - retval = set_nonblocking(fd); - if (retval) { - close(fd); - return retval; - } - - if (listen(fd, 10) < 0) { - int error = errno; - VLOG_ERR("%s: listen: %s", name, strerror(error)); - close(fd); - return error; - } - - ps = xmalloc(sizeof *ps); + struct pstream_pvconn *ps = xmalloc(sizeof *ps); pvconn_init(&ps->pvconn, &pstream_pvconn_class, name); ps->fd = fd; ps->accept_cb = accept_cb;