X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fstream-ssl.c;h=7a0d2189a73f29d92c614ecf1b0bf6bdb7fd649b;hb=0ef165ecb57943e17a8ee8270df68ffb8d032e29;hp=0dc832de98eb47477cb3dae680ab5f10ba744b00;hpb=0f0b5401fe0fb7526da142e9e425afa08dd519f3;p=sliver-openvswitch.git diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c index 0dc832de9..7a0d2189a 100644 --- a/lib/stream-ssl.c +++ b/lib/stream-ssl.c @@ -60,8 +60,6 @@ * compiled with /MD is not tested. */ #include #define SHUT_RDWR SD_BOTH -#else -#define closesocket close #endif VLOG_DEFINE_THIS_MODULE(stream_ssl); @@ -652,14 +650,15 @@ ssl_do_tx(struct stream *stream) for (;;) { int old_state = SSL_get_state(sslv->ssl); - int ret = SSL_write(sslv->ssl, sslv->txbuf->data, sslv->txbuf->size); + int ret = SSL_write(sslv->ssl, + ofpbuf_data(sslv->txbuf), ofpbuf_size(sslv->txbuf)); if (old_state != SSL_get_state(sslv->ssl)) { sslv->rx_want = SSL_NOTHING; } sslv->tx_want = SSL_NOTHING; if (ret > 0) { ofpbuf_pull(sslv->txbuf, ret); - if (sslv->txbuf->size == 0) { + if (ofpbuf_size(sslv->txbuf) == 0) { return 0; } } else {