aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/smtp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/smtp')
-rw-r--r--src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp16
-rw-r--r--src/net/smtp/SMTPCommand.cpp4
-rw-r--r--src/net/smtp/SMTPConnection.cpp6
-rw-r--r--src/net/smtp/SMTPResponse.cpp4
-rw-r--r--src/net/smtp/SMTPTransport.cpp6
5 files changed, 18 insertions, 18 deletions
diff --git a/src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp b/src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp
index 0584f7e6..69f63bc9 100644
--- a/src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp
+++ b/src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp
@@ -47,7 +47,7 @@ SMTPChunkingOutputStreamAdapter::SMTPChunkingOutputStreamAdapter(shared_ptr <SMT
void SMTPChunkingOutputStreamAdapter::sendChunk
- (const value_type* const data, const size_type count, const bool last)
+ (const byte_t* const data, const size_t count, const bool last)
{
if (count == 0 && !last)
{
@@ -96,17 +96,17 @@ void SMTPChunkingOutputStreamAdapter::sendChunk
}
-void SMTPChunkingOutputStreamAdapter::write
- (const value_type* const data, const size_type count)
+void SMTPChunkingOutputStreamAdapter::writeImpl
+ (const byte_t* const data, const size_t count)
{
- const value_type* curData = data;
- size_type curCount = count;
+ const byte_t* curData = data;
+ size_t curCount = count;
while (curCount != 0)
{
// Fill the buffer
- const size_type remaining = sizeof(m_buffer) - m_bufferSize;
- const size_type bytesToCopy = std::min(remaining, curCount);
+ const size_t remaining = sizeof(m_buffer) - m_bufferSize;
+ const size_t bytesToCopy = std::min(remaining, curCount);
std::copy(data, data + bytesToCopy, m_buffer + m_bufferSize);
@@ -131,7 +131,7 @@ void SMTPChunkingOutputStreamAdapter::flush()
}
-utility::stream::size_type SMTPChunkingOutputStreamAdapter::getBlockSize()
+size_t SMTPChunkingOutputStreamAdapter::getBlockSize()
{
return sizeof(m_buffer);
}
diff --git a/src/net/smtp/SMTPCommand.cpp b/src/net/smtp/SMTPCommand.cpp
index 6b3d1d79..949ab0c1 100644
--- a/src/net/smtp/SMTPCommand.cpp
+++ b/src/net/smtp/SMTPCommand.cpp
@@ -94,7 +94,7 @@ shared_ptr <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8)
// static
-shared_ptr <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8, const unsigned long size)
+shared_ptr <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8, const size_t size)
{
std::ostringstream cmd;
cmd.imbue(std::locale::classic());
@@ -160,7 +160,7 @@ shared_ptr <SMTPCommand> SMTPCommand::DATA()
// static
-shared_ptr <SMTPCommand> SMTPCommand::BDAT(const unsigned long chunkSize, const bool last)
+shared_ptr <SMTPCommand> SMTPCommand::BDAT(const size_t chunkSize, const bool last)
{
std::ostringstream cmd;
cmd.imbue(std::locale::classic());
diff --git a/src/net/smtp/SMTPConnection.cpp b/src/net/smtp/SMTPConnection.cpp
index 9fcacbc1..26be25db 100644
--- a/src/net/smtp/SMTPConnection.cpp
+++ b/src/net/smtp/SMTPConnection.cpp
@@ -396,10 +396,10 @@ void SMTPConnection::authenticateSASL()
case 334:
{
byte_t* challenge = 0;
- long challengeLen = 0;
+ size_t challengeLen = 0;
byte_t* resp = 0;
- long respLen = 0;
+ size_t respLen = 0;
try
{
@@ -428,7 +428,7 @@ void SMTPConnection::authenticateSASL()
}
// Cancel SASL exchange
- m_socket->sendRaw("*\r\n", 3);
+ m_socket->send("*\r\n");
}
catch (...)
{
diff --git a/src/net/smtp/SMTPResponse.cpp b/src/net/smtp/SMTPResponse.cpp
index baefc38d..f7980351 100644
--- a/src/net/smtp/SMTPResponse.cpp
+++ b/src/net/smtp/SMTPResponse.cpp
@@ -128,11 +128,11 @@ const string SMTPResponse::readResponseLine()
while (true)
{
// Get a line from the response buffer
- const string::size_type lineEnd = currentBuffer.find_first_of('\n');
+ const size_t lineEnd = currentBuffer.find_first_of('\n');
if (lineEnd != string::npos)
{
- string::size_type actualLineEnd = lineEnd;
+ size_t actualLineEnd = lineEnd;
if (actualLineEnd != 0 && currentBuffer[actualLineEnd - 1] == '\r') // CRLF case
actualLineEnd--;
diff --git a/src/net/smtp/SMTPTransport.cpp b/src/net/smtp/SMTPTransport.cpp
index 4f409a03..0020d010 100644
--- a/src/net/smtp/SMTPTransport.cpp
+++ b/src/net/smtp/SMTPTransport.cpp
@@ -163,7 +163,7 @@ void SMTPTransport::noop()
void SMTPTransport::sendEnvelope
(const mailbox& expeditor, const mailboxList& recipients,
const mailbox& sender, bool sendDATACommand,
- const utility::stream::size_type size)
+ const size_t size)
{
// If no recipient/expeditor was found, throw an exception
if (recipients.isEmpty())
@@ -315,7 +315,7 @@ void SMTPTransport::sendEnvelope
void SMTPTransport::send
(const mailbox& expeditor, const mailboxList& recipients,
- utility::inputStream& is, const utility::stream::size_type size,
+ utility::inputStream& is, const size_t size,
utility::progressListener* progress, const mailbox& sender)
{
if (!isConnected())
@@ -334,7 +334,7 @@ void SMTPTransport::send
fos.flush();
// Send end-of-data delimiter
- m_connection->getSocket()->sendRaw("\r\n.\r\n", 5);
+ m_connection->getSocket()->send("\r\n.\r\n");
shared_ptr <SMTPResponse> resp;