aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2016-03-03 19:24:27 +0000
committerVincent Richard <[email protected]>2016-03-03 19:24:27 +0000
commitb8b5586d6a12a37a663a4b0ab3f5ac9cd4416198 (patch)
treebe1b43d5ecce5dc1d1534e86e6d515468781ff45
parentFixed #132: invalid pointer to temporary buffer. (diff)
downloadvmime-b8b5586d6a12a37a663a4b0ab3f5ac9cd4416198.tar.gz
vmime-b8b5586d6a12a37a663a4b0ab3f5ac9cd4416198.zip
Fixed #134: use MSG_NOSIGNAL to avoid SIGPIPE.
-rw-r--r--src/vmime/platforms/posix/posixSocket.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vmime/platforms/posix/posixSocket.cpp b/src/vmime/platforms/posix/posixSocket.cpp
index 7272eed1..d129a8f0 100644
--- a/src/vmime/platforms/posix/posixSocket.cpp
+++ b/src/vmime/platforms/posix/posixSocket.cpp
@@ -723,7 +723,7 @@ void posixSocket::sendRaw(const byte_t* buffer, const size_t count)
while (size > 0)
{
- const ssize_t ret = ::send(m_desc, buffer, size, 0);
+ const ssize_t ret = ::send(m_desc, buffer, size, MSG_NOSIGNAL);
if (ret <= 0)
{
@@ -749,7 +749,7 @@ size_t posixSocket::sendRawNonBlocking(const byte_t* buffer, const size_t count)
{
m_status &= ~STATUS_WOULDBLOCK;
- const ssize_t ret = ::send(m_desc, buffer, count, 0);
+ const ssize_t ret = ::send(m_desc, buffer, count, MSG_NOSIGNAL);
if (ret <= 0)
{