Dependents:   TimeZoneDemo EthernetJackTestCode MMEx_Challenge ntp_mem ... more

Files at this revision

API Documentation at this revision

Comitter:
segundo
Date:
Sun Nov 28 00:29:32 2010 +0000
Parent:
5:fa27dde97304
Child:
7:4e2468d7d5cb
Commit message:

Changed in this revision

services/email/smtp/SMTPClient.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/services/email/smtp/SMTPClient.cpp	Sat Nov 27 23:23:43 2010 +0000
+++ b/services/email/smtp/SMTPClient.cpp	Sun Nov 28 00:29:32 2010 +0000
@@ -70,19 +70,14 @@
 }
 
 string SMTPClient::encodePlainAuth() {
-    string auth = "AUTH PLAIN ";
     string decStr = m_username;
     decStr += '\0';
     decStr += m_username;
     decStr += '\0';
     decStr += m_password;
 
-    char* out = new char[ (((decStr.length()-1)/3)+1)<<2 ];
-    base64enc(decStr.c_str(), decStr.length(), out);
-    auth.append(string(out));
-    delete[] out;
-
-    return auth;
+    string auth = "AUTH PLAIN ";
+    return auth.append(Base64::encode(decStr));
 }
 
 void SMTPClient::setHeloDomain(const char* heloDomain) {