X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fstream-ssl.c;h=7a0d2189a73f29d92c614ecf1b0bf6bdb7fd649b;hb=0ef165ecb57943e17a8ee8270df68ffb8d032e29;hp=ddf388f33861885f807ff6043db54f8b537d89e0;hpb=5ea1366bc95d68712121c45ef1695d4edf616665;p=sliver-openvswitch.git diff --git a/lib/stream-ssl.c b/lib/stream-ssl.c index ddf388f33..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 { @@ -1416,18 +1415,6 @@ ssl_protocol_cb(int write_p, int version OVS_UNUSED, int content_type, ds_destroy(&details); } -/* In Windows platform, errno is not set for socket calls. - * The last error has to be gotten from WSAGetLastError(). */ -static int -sock_errno(void) -{ -#ifdef _WIN32 - return WSAGetLastError(); -#else - return errno; -#endif -} - static void clear_handle(int fd OVS_UNUSED, HANDLE wevent OVS_UNUSED) {