diff options
| author | Debi King (Dessie) <dessie@lindenlab.com> | 2011-10-27 14:54:57 -0400 |
|---|---|---|
| committer | Debi King (Dessie) <dessie@lindenlab.com> | 2011-10-27 14:54:57 -0400 |
| commit | 8c318d16393229044a401243a95fc8bb5e805c7f (patch) | |
| tree | 56edab693a1977fb117eb7e2d85b60648898cee1 /indra/llmessage/llmail.cpp | |
| parent | 1eda81eac813447cd357ac1972654ee9c1ec5506 (diff) | |
| parent | e062be734ae421cc793a4c5e2e077a0c1d22262d (diff) | |
reconciled .hgtags
Diffstat (limited to 'indra/llmessage/llmail.cpp')
| -rw-r--r-- | indra/llmessage/llmail.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/indra/llmessage/llmail.cpp b/indra/llmessage/llmail.cpp index 8a898ab1b0..08b31e9c7a 100644 --- a/indra/llmessage/llmail.cpp +++ b/indra/llmessage/llmail.cpp @@ -50,7 +50,6 @@ #include "llstring.h" #include "lluuid.h" #include "net.h" -#include "llaprpool.h" // // constants @@ -58,7 +57,7 @@ const size_t LL_MAX_KNOWN_GOOD_MAIL_SIZE = 4096; static bool gMailEnabled = true; -static LLAPRPool gMailPool; +static apr_pool_t* gMailPool; static apr_sockaddr_t* gSockAddr; static apr_socket_t* gMailSocket; @@ -83,7 +82,7 @@ bool connect_smtp() gSockAddr->sa.sin.sin_family, SOCK_STREAM, APR_PROTO_TCP, - gMailPool()); + gMailPool); if(ll_apr_warn_status(status)) return false; status = apr_socket_connect(gMailSocket, gSockAddr); if(ll_apr_warn_status(status)) @@ -140,19 +139,19 @@ BOOL LLMail::send( } // static -void LLMail::init(const std::string& hostname) +void LLMail::init(const std::string& hostname, apr_pool_t* pool) { gMailSocket = NULL; - if (hostname.empty()) + if(hostname.empty() || !pool) { + gMailPool = NULL; gSockAddr = NULL; - gMailPool.destroy(); } else { - gMailPool.create(); + gMailPool = pool; - // Collect all the information into a sockaddr structure. the + // collect all the information into a socaddr sturcture. the // documentation is a bit unclear, but I either have to // specify APR_UNSPEC or not specify any flags. I am not sure // which option is better. @@ -162,7 +161,7 @@ void LLMail::init(const std::string& hostname) APR_UNSPEC, 25, APR_IPV4_ADDR_OK, - gMailPool()); + gMailPool); ll_apr_warn_status(status); } } |
