#include <sys/types.h>
#include <unistd.h>
#include "ofpbuf.h"
-#include "openflow.h"
+#include "openflow/openflow.h"
#include "poll-loop.h"
#include "socket-util.h"
#include "util.h"
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(10, 25);
+static void stream_clear_txbuf(struct stream_vconn *);
+
int
new_stream_vconn(const char *name, int fd, int connect_status,
uint32_t ip, struct vconn **vconnp)
{
struct stream_vconn *s = stream_vconn_cast(vconn);
poll_cancel(s->tx_waiter);
+ stream_clear_txbuf(s);
+ ofpbuf_delete(s->rxbuf);
close(s->fd);
free(s);
}
return EOF;
}
} else {
- return retval ? errno : EAGAIN;
+ return errno;
}
}