https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4973a53fc32c478d25eeac326d8036da9aadad03

commit 4973a53fc32c478d25eeac326d8036da9aadad03
Author:     Amine Khaldi <[email protected]>
AuthorDate: Sat Jan 26 13:10:33 2019 +0100
Commit:     Amine Khaldi <[email protected]>
CommitDate: Sat Jan 26 13:10:33 2019 +0100

    [INETCOMM] Sync with Wine Staging 4.0. CORE-15682
---
 dll/win32/inetcomm/mimeole.c       | 16 ++++++++++------
 dll/win32/inetcomm/smtptransport.c | 20 ++++++++++----------
 media/doc/README.WINE              |  2 +-
 3 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/dll/win32/inetcomm/mimeole.c b/dll/win32/inetcomm/mimeole.c
index f13a4ff17a..47061490bd 100644
--- a/dll/win32/inetcomm/mimeole.c
+++ b/dll/win32/inetcomm/mimeole.c
@@ -822,16 +822,21 @@ static void empty_param_list(struct list *list)
     }
 }
 
+static void free_header(header_t *header)
+{
+    list_remove(&header->entry);
+    PropVariantClear(&header->value);
+    empty_param_list(&header->params);
+    heap_free(header);
+}
+
 static void empty_header_list(struct list *list)
 {
     header_t *header, *cursor2;
 
     LIST_FOR_EACH_ENTRY_SAFE(header, cursor2, list, header_t, entry)
     {
-        list_remove(&header->entry);
-        PropVariantClear(&header->value);
-        empty_param_list(&header->params);
-        HeapFree(GetProcessHeap(), 0, header);
+        free_header(header);
     }
 }
 
@@ -1235,8 +1240,7 @@ static HRESULT WINAPI MimeBody_DeleteProp(
 
         if(found)
         {
-             list_remove(&cursor->entry);
-             HeapFree(GetProcessHeap(), 0, cursor);
+             free_header(cursor);
              return S_OK;
         }
     }
diff --git a/dll/win32/inetcomm/smtptransport.c 
b/dll/win32/inetcomm/smtptransport.c
index af11308258..d71061ed6b 100644
--- a/dll/win32/inetcomm/smtptransport.c
+++ b/dll/win32/inetcomm/smtptransport.c
@@ -281,7 +281,7 @@ static void 
SMTPTransport_CallbackSendHello(IInternetTransport *iface, char *pBu
     HRESULT hr;
     const char *pszHello;
     char *pszCommand;
-    const char szHostName[] = "localhost"; /* FIXME */
+    static const char szHostName[] = "localhost"; /* FIXME */
 
     TRACE("\n");
 
@@ -483,7 +483,7 @@ static void 
SMTPTransport_CallbackMessageSendTo(IInternetTransport *iface, char
 
         if 
((This->pending_message.rAddressList.prgAddress[This->ulCurrentAddressIndex].addrtype
 & ADDR_TOFROM_MASK) == ADDR_TO)
         {
-            const char szCommandFormat[] = "RCPT TO: <%s>\n";
+            static const char szCommandFormat[] = "RCPT TO: <%s>\n";
             char *szCommand;
             int len = sizeof(szCommandFormat) - 2 /* "%s" */ +
                 
strlen(This->pending_message.rAddressList.prgAddress[This->ulCurrentAddressIndex].szEmail);
@@ -659,10 +659,10 @@ static HRESULT WINAPI 
SMTPTransport_InitNew(ISMTPTransport2 *iface,
 static HRESULT WINAPI SMTPTransport_SendMessage(ISMTPTransport2 *iface,
     LPSMTPMESSAGE pMessage)
 {
+    static const char szCommandFormat[] = "MAIL FROM: <%s>\n";
     SMTPTransport *This = (SMTPTransport *)iface;
     ULONG i, size;
     LPSTR pszFromAddress = NULL;
-    const char szCommandFormat[] = "MAIL FROM: <%s>\n";
     char *szCommand;
     int len;
     HRESULT hr;
@@ -723,8 +723,8 @@ static HRESULT WINAPI 
SMTPTransport_SendMessage(ISMTPTransport2 *iface,
 
 static HRESULT WINAPI SMTPTransport_CommandMAIL(ISMTPTransport2 *iface, LPSTR 
pszEmailFrom)
 {
+    static const char szCommandFormat[] = "MAIL FROM: <%s>\n";
     SMTPTransport *This = (SMTPTransport *)iface;
-    const char szCommandFormat[] = "MAIL FROM: <%s>\n";
     char *szCommand;
     int len;
     HRESULT hr;
@@ -750,8 +750,8 @@ static HRESULT WINAPI 
SMTPTransport_CommandMAIL(ISMTPTransport2 *iface, LPSTR ps
 
 static HRESULT WINAPI SMTPTransport_CommandRCPT(ISMTPTransport2 *iface, LPSTR 
pszEmailTo)
 {
+    static const char szCommandFormat[] = "RCPT TO: <%s>\n";
     SMTPTransport *This = (SMTPTransport *)iface;
-    const char szCommandFormat[] = "RCPT TO: <%s>\n";
     char *szCommand;
     int len;
     HRESULT hr;
@@ -777,9 +777,9 @@ static HRESULT WINAPI 
SMTPTransport_CommandRCPT(ISMTPTransport2 *iface, LPSTR ps
 
 static HRESULT WINAPI SMTPTransport_CommandEHLO(ISMTPTransport2 *iface)
 {
+    static const char szCommandFormat[] = "EHLO %s\n";
+    static const char szHostname[] = "localhost"; /* FIXME */
     SMTPTransport *This = (SMTPTransport *)iface;
-    const char szCommandFormat[] = "EHLO %s\n";
-    const char szHostname[] = "localhost"; /* FIXME */
     char *szCommand;
     int len = sizeof(szCommandFormat) - 2 /* "%s" */ + sizeof(szHostname);
     HRESULT hr;
@@ -801,9 +801,9 @@ static HRESULT WINAPI 
SMTPTransport_CommandEHLO(ISMTPTransport2 *iface)
 
 static HRESULT WINAPI SMTPTransport_CommandHELO(ISMTPTransport2 *iface)
 {
+    static const char szCommandFormat[] = "HELO %s\n";
+    static const char szHostname[] = "localhost"; /* FIXME */
     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;
@@ -826,8 +826,8 @@ static HRESULT WINAPI 
SMTPTransport_CommandHELO(ISMTPTransport2 *iface)
 static HRESULT WINAPI SMTPTransport_CommandAUTH(ISMTPTransport2 *iface,
     LPSTR pszAuthType)
 {
+    static const char szCommandFormat[] = "AUTH %s\n";
     SMTPTransport *This = (SMTPTransport *)iface;
-    const char szCommandFormat[] = "AUTH %s\n";
     char *szCommand;
     int len;
     HRESULT hr;
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 5d821d721b..7439319218 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -78,7 +78,7 @@ reactos/dll/win32/ieframe             # Synced to 
WineStaging-4.0
 reactos/dll/win32/imaadp32.acm        # Synced to WineStaging-4.0
 reactos/dll/win32/imagehlp            # Synced to WineStaging-3.3
 reactos/dll/win32/imm32               # Synced to WineStaging-4.0
-reactos/dll/win32/inetcomm            # Synced to WineStaging-3.17
+reactos/dll/win32/inetcomm            # Synced to WineStaging-4.0
 reactos/dll/win32/inetmib1            # Synced to WineStaging-3.17
 reactos/dll/win32/initpki             # Synced to WineStaging-3.3
 reactos/dll/win32/inseng              # Synced to WineStaging-3.3

Reply via email to