[06/14] inetcomm: Add an implementation of ISMTPTransport2::CommandHELO.

Hans Leidekker hans at codeweavers.com
Fri Oct 31 07:51:25 CDT 2008


Changelog
 Rob Shearman <rob at codeweavers.com>
 Add an implementation of ISMTPTransport2::CommandHELO.

 -Hans

diff --git a/dlls/inetcomm/smtptransport.c b/dlls/inetcomm/smtptransport.c
index ee467c6..c5b8c53 100644
--- a/dlls/inetcomm/smtptransport.c
+++ b/dlls/inetcomm/smtptransport.c
@@ -771,8 +771,26 @@ static HRESULT WINAPI SMTPTransport_CommandEHLO(ISMTPTransport2 *iface)
 
 static HRESULT WINAPI SMTPTransport_CommandHELO(ISMTPTransport2 *iface)
 {
-    FIXME("()\n");
-    return E_NOTIMPL;
+    SMTPTransport *This = (SMTPTransport *)iface;
+    const char szCommandFormat[] = "HELO %s\n";
+    const char szHostname[] = "localhost"; /* FIXME */
+    char *szCommand;
+    int len = sizeof(szCommandFormat) - 2 /* "%s" */ + sizeof(szHostname);
+    HRESULT hr;
+
+    TRACE("()\n");
+
+    szCommand = HeapAlloc(GetProcessHeap(), 0, len);
+    if (!szCommand)
+        return E_OUTOFMEMORY;
+
+    sprintf(szCommand, szCommandFormat, szHostname);
+
+    hr = InternetTransport_DoCommand(&This->InetTransport, szCommand,
+        SMTPTransport_CallbackReadResponseDoNothing);
+
+    HeapFree(GetProcessHeap(), 0, szCommand);
+    return hr;
 }
 
 static HRESULT WINAPI SMTPTransport_CommandAUTH(ISMTPTransport2 *iface,



More information about the wine-patches mailing list