Rob Shearman : inetcomm: Add an implementation of ISMTPTransport2:: CommandAUTH.

Alexandre Julliard julliard at winehq.org
Fri Oct 31 09:24:31 CDT 2008


Module: wine
Branch: master
Commit: a48b5387cf8ebe12f0981159b532d97a184c59d4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a48b5387cf8ebe12f0981159b532d97a184c59d4

Author: Rob Shearman <rob at codeweavers.com>
Date:   Fri Oct 31 13:51:35 2008 +0100

inetcomm: Add an implementation of ISMTPTransport2::CommandAUTH.

---

 dlls/inetcomm/smtptransport.c |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/dlls/inetcomm/smtptransport.c b/dlls/inetcomm/smtptransport.c
index c5b8c53..014fd8b 100644
--- a/dlls/inetcomm/smtptransport.c
+++ b/dlls/inetcomm/smtptransport.c
@@ -796,8 +796,28 @@ static HRESULT WINAPI SMTPTransport_CommandHELO(ISMTPTransport2 *iface)
 static HRESULT WINAPI SMTPTransport_CommandAUTH(ISMTPTransport2 *iface,
     LPSTR pszAuthType)
 {
-    FIXME("(%s)\n", pszAuthType);
-    return E_NOTIMPL;
+    SMTPTransport *This = (SMTPTransport *)iface;
+    const char szCommandFormat[] = "AUTH %s\n";
+    char *szCommand;
+    int len = sizeof(szCommandFormat) - 2 /* "%s" */ + strlen(pszAuthType);
+    HRESULT hr;
+
+    TRACE("(%s)\n", pszAuthType);
+
+    if (!pszAuthType)
+        return E_INVALIDARG;
+
+    szCommand = HeapAlloc(GetProcessHeap(), 0, len);
+    if (!szCommand)
+        return E_OUTOFMEMORY;
+
+    sprintf(szCommand, szCommandFormat, pszAuthType);
+
+    hr = InternetTransport_DoCommand(&This->InetTransport, szCommand,
+        SMTPTransport_CallbackReadResponseDoNothing);
+
+    HeapFree(GetProcessHeap(), 0, szCommand);
+    return hr;
 }
 
 static HRESULT WINAPI SMTPTransport_CommandQUIT(ISMTPTransport2 *iface)




More information about the wine-cvs mailing list