summaryrefslogtreecommitdiff
path: root/indra/llmessage/llmail.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-05-06 18:21:04 -0700
committerMerov Linden <merov@lindenlab.com>2014-05-06 18:21:04 -0700
commit8dae4bc222d1b0744254442ab0b26538285341de (patch)
tree88da67f01f0dc32457b4a5085d5e699ea55715a4 /indra/llmessage/llmail.cpp
parentf6bb6a0f935323434a3f3d0d94e94c8d8238effe (diff)
parentd0ef02c23a7a37c8c9bfe3a86bae88bb811fc9fe (diff)
Pull merge from lindenlab/viewer-release. Fixed some conflicts and compile errors
Diffstat (limited to 'indra/llmessage/llmail.cpp')
-rwxr-xr-xindra/llmessage/llmail.cpp45
1 files changed, 20 insertions, 25 deletions
diff --git a/indra/llmessage/llmail.cpp b/indra/llmessage/llmail.cpp
index 08b31e9c7a..134154aa6c 100755
--- a/indra/llmessage/llmail.cpp
+++ b/indra/llmessage/llmail.cpp
@@ -29,12 +29,7 @@
#include "llmail.h"
// APR on Windows needs full windows headers
-#ifdef LL_WINDOWS
-# undef WIN32_LEAN_AND_MEAN
-# include <winsock2.h>
-# include <windows.h>
-#endif
-
+#include "llwin32headers.h"
#include <string>
#include <sstream>
@@ -199,16 +194,16 @@ std::string LLMail::buildSMTPTransaction(
{
if(!from_address || !to_address)
{
- llinfos << "send_mail build_smtp_transaction reject: missing to and/or"
- << " from address." << llendl;
+ LL_INFOS() << "send_mail build_smtp_transaction reject: missing to and/or"
+ << " from address." << LL_ENDL;
return std::string();
}
if(!valid_subject_chars(subject))
{
- llinfos << "send_mail build_smtp_transaction reject: bad subject header: "
+ LL_INFOS() << "send_mail build_smtp_transaction reject: bad subject header: "
<< "to=<" << to_address
<< ">, from=<" << from_address << ">"
- << llendl;
+ << LL_ENDL;
return std::string();
}
std::ostringstream from_fmt;
@@ -265,8 +260,8 @@ bool LLMail::send(
{
if(!from_address || !to_address)
{
- llinfos << "send_mail reject: missing to and/or from address."
- << llendl;
+ LL_INFOS() << "send_mail reject: missing to and/or from address."
+ << LL_ENDL;
return false;
}
@@ -303,26 +298,26 @@ bool LLMail::send(
if(!gMailEnabled)
{
- llinfos << "send_mail reject: mail system is disabled: to=<"
+ LL_INFOS() << "send_mail reject: mail system is disabled: to=<"
<< to_address << ">, from=<" << from_address
- << ">" << llendl;
+ << ">" << LL_ENDL;
// Any future interface to SMTP should return this as an
// error. --mark
return true;
}
if(!gSockAddr)
{
- llwarns << "send_mail reject: mail system not initialized: to=<"
+ LL_WARNS() << "send_mail reject: mail system not initialized: to=<"
<< to_address << ">, from=<" << from_address
- << ">" << llendl;
+ << ">" << LL_ENDL;
return false;
}
if(!connect_smtp())
{
- llwarns << "send_mail reject: SMTP connect failure: to=<"
+ LL_WARNS() << "send_mail reject: SMTP connect failure: to=<"
<< to_address << ">, from=<" << from_address
- << ">" << llendl;
+ << ">" << LL_ENDL;
return false;
}
@@ -338,27 +333,27 @@ bool LLMail::send(
disconnect_smtp();
if(ll_apr_warn_status(status))
{
- llwarns << "send_mail socket failure: unable to write "
+ LL_WARNS() << "send_mail socket failure: unable to write "
<< "to=<" << to_address
<< ">, from=<" << from_address << ">"
<< ", bytes=" << original_size
- << ", sent=" << send_size << llendl;
+ << ", sent=" << send_size << LL_ENDL;
return false;
}
if(send_size >= LL_MAX_KNOWN_GOOD_MAIL_SIZE)
{
- llwarns << "send_mail message has been shown to fail in testing "
+ LL_WARNS() << "send_mail message has been shown to fail in testing "
<< "when sending messages larger than " << LL_MAX_KNOWN_GOOD_MAIL_SIZE
- << " bytes. The next log about success is potentially a lie." << llendl;
+ << " bytes. The next log about success is potentially a lie." << LL_ENDL;
}
- lldebugs << "send_mail success: "
+ LL_DEBUGS() << "send_mail success: "
<< "to=<" << to_address
<< ">, from=<" << from_address << ">"
<< ", bytes=" << original_size
- << ", sent=" << send_size << llendl;
+ << ", sent=" << send_size << LL_ENDL;
#if LL_LOG_ENTIRE_MAIL_MESSAGE_ON_SEND
- llinfos << rfc2822_msg.str() << llendl;
+ LL_INFOS() << rfc2822_msg.str() << LL_ENDL;
#endif
return true;
}