Hans Leidekker : inetcomm: Add an implementation of IPOP3Transport:: CommandUSER.

Alexandre Julliard julliard at winehq.org
Tue Nov 4 07:29:29 CST 2008


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue Nov  4 11:34:34 2008 +0100

inetcomm: Add an implementation of IPOP3Transport::CommandUSER.

---

 dlls/inetcomm/pop3transport.c |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/dlls/inetcomm/pop3transport.c b/dlls/inetcomm/pop3transport.c
index 1cc8aa9..6c9d8fa 100644
--- a/dlls/inetcomm/pop3transport.c
+++ b/dlls/inetcomm/pop3transport.c
@@ -416,8 +416,25 @@ static HRESULT WINAPI POP3Transport_CommandAUTH(IPOP3Transport *iface, LPSTR psz
 
 static HRESULT WINAPI POP3Transport_CommandUSER(IPOP3Transport *iface, LPSTR username)
 {
-    FIXME("(%s)\n", username);
-    return E_NOTIMPL;
+    static char user[] = "USER ";
+    POP3Transport *This = (POP3Transport *)iface;
+    char *command;
+    int len;
+
+    TRACE("(%s)\n", username);
+
+    len = sizeof(user) + strlen(username) + 2; /* "\r\n" */
+    command = HeapAlloc(GetProcessHeap(), 0, len);
+
+    strcpy(command, user);
+    strcat(command, username);
+    strcat(command, "\r\n");
+
+    This->command = POP3_USER;
+    InternetTransport_DoCommand(&This->InetTransport, command, POP3Transport_CallbackRecvUSERResp);
+
+    HeapFree(GetProcessHeap(), 0, command);
+    return S_OK;
 }
 
 static HRESULT WINAPI POP3Transport_CommandPASS(IPOP3Transport *iface, LPSTR password)




More information about the wine-cvs mailing list