[INETCOMM] Sync with Wine Staging 4.0. CORE-15682
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 26 Jan 2019 12:10:33 +0000 (13:10 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 26 Jan 2019 12:10:33 +0000 (13:10 +0100)
dll/win32/inetcomm/mimeole.c
dll/win32/inetcomm/smtptransport.c
media/doc/README.WINE

index f13a4ff..4706149 100644 (file)
@@ -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)
     {
 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)
         {
 
         if(found)
         {
-             list_remove(&cursor->entry);
-             HeapFree(GetProcessHeap(), 0, cursor);
+             free_header(cursor);
              return S_OK;
         }
     }
              return S_OK;
         }
     }
index af11308..d71061e 100644 (file)
@@ -281,7 +281,7 @@ static void SMTPTransport_CallbackSendHello(IInternetTransport *iface, char *pBu
     HRESULT hr;
     const char *pszHello;
     char *pszCommand;
     HRESULT hr;
     const char *pszHello;
     char *pszCommand;
-    const char szHostName[] = "localhost"; /* FIXME */
+    static const char szHostName[] = "localhost"; /* FIXME */
 
     TRACE("\n");
 
 
     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)
         {
 
         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);
             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 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;
     SMTPTransport *This = (SMTPTransport *)iface;
     ULONG i, size;
     LPSTR pszFromAddress = NULL;
-    const char szCommandFormat[] = "MAIL FROM: <%s>\n";
     char *szCommand;
     int len;
     HRESULT hr;
     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 HRESULT WINAPI SMTPTransport_CommandMAIL(ISMTPTransport2 *iface, LPSTR pszEmailFrom)
 {
+    static const char szCommandFormat[] = "MAIL FROM: <%s>\n";
     SMTPTransport *This = (SMTPTransport *)iface;
     SMTPTransport *This = (SMTPTransport *)iface;
-    const char szCommandFormat[] = "MAIL FROM: <%s>\n";
     char *szCommand;
     int len;
     HRESULT hr;
     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 HRESULT WINAPI SMTPTransport_CommandRCPT(ISMTPTransport2 *iface, LPSTR pszEmailTo)
 {
+    static const char szCommandFormat[] = "RCPT TO: <%s>\n";
     SMTPTransport *This = (SMTPTransport *)iface;
     SMTPTransport *This = (SMTPTransport *)iface;
-    const char szCommandFormat[] = "RCPT TO: <%s>\n";
     char *szCommand;
     int len;
     HRESULT hr;
     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 HRESULT WINAPI SMTPTransport_CommandEHLO(ISMTPTransport2 *iface)
 {
+    static const char szCommandFormat[] = "EHLO %s\n";
+    static const char szHostname[] = "localhost"; /* FIXME */
     SMTPTransport *This = (SMTPTransport *)iface;
     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;
     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 HRESULT WINAPI SMTPTransport_CommandHELO(ISMTPTransport2 *iface)
 {
+    static const char szCommandFormat[] = "HELO %s\n";
+    static const char szHostname[] = "localhost"; /* FIXME */
     SMTPTransport *This = (SMTPTransport *)iface;
     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;
     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 HRESULT WINAPI SMTPTransport_CommandAUTH(ISMTPTransport2 *iface,
     LPSTR pszAuthType)
 {
+    static const char szCommandFormat[] = "AUTH %s\n";
     SMTPTransport *This = (SMTPTransport *)iface;
     SMTPTransport *This = (SMTPTransport *)iface;
-    const char szCommandFormat[] = "AUTH %s\n";
     char *szCommand;
     int len;
     HRESULT hr;
     char *szCommand;
     int len;
     HRESULT hr;
index 5d821d7..7439319 100644 (file)
@@ -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/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
 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