From 6b5d888db33fa1822c7088ad151d33f88b72329d Mon Sep 17 00:00:00 2001 From: Paul-Louis Ageneau Date: Tue, 13 Apr 2021 09:35:48 +0200 Subject: [PATCH] Fixed recv instead of send for buffer size --- src/impl/sctptransport.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/impl/sctptransport.cpp b/src/impl/sctptransport.cpp index 6c21b46..8e32db9 100644 --- a/src/impl/sctptransport.cpp +++ b/src/impl/sctptransport.cpp @@ -258,8 +258,8 @@ SctpTransport::SctpTransport(shared_ptr lower, const Configuration &c std::to_string(errno)); int sndBuf = 0; socklen_t sndBufLen = sizeof(sndBuf); - if (usrsctp_getsockopt(mSock, SOL_SOCKET, SO_SNDBUF, &rcvBuf, &sndBufLen)) - throw std::runtime_error("Could not get SCTP recv buffer size, errno=" + + if (usrsctp_getsockopt(mSock, SOL_SOCKET, SO_SNDBUF, &sndBuf, &sndBufLen)) + throw std::runtime_error("Could not get SCTP send buffer size, errno=" + std::to_string(errno)); // Ensure the buffer is also large enough to accomodate the largest messages