Hans Leidekker : jsproxy: Allow multiple calls to InternetInitializeAutoProxyDll.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Apr 20 10:36:08 CDT 2016
Module: wine
Branch: master
Commit: d4c9440f71434a0816dbdd5c7daa93f1fd10759b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d4c9440f71434a0816dbdd5c7daa93f1fd10759b
Author: Hans Leidekker <hans at codeweavers.com>
Date: Wed Apr 20 10:14:47 2016 +0200
jsproxy: Allow multiple calls to InternetInitializeAutoProxyDll.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/jsproxy/main.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/jsproxy/main.c b/dlls/jsproxy/main.c
index 0399173..e277a0b 100644
--- a/dlls/jsproxy/main.c
+++ b/dlls/jsproxy/main.c
@@ -186,14 +186,16 @@ BOOL WINAPI JSPROXY_InternetInitializeAutoProxyDll( DWORD version, LPSTR tmpfile
EnterCriticalSection( &cs_jsproxy );
- if (global_script->text)
+ if (buffer && buffer->dwStructSize == sizeof(*buffer) && buffer->lpszScriptBuffer)
{
- LeaveCriticalSection( &cs_jsproxy );
- return FALSE;
+ heap_free( global_script->text );
+ if( (global_script->text = strdupAW( buffer->lpszScriptBuffer, buffer->dwScriptBufferSize ))) ret = TRUE;
+ }
+ else
+ {
+ heap_free( global_script->text );
+ if ((global_script->text = load_script( tmpfile ))) ret = TRUE;
}
- if (buffer && buffer->dwStructSize == sizeof(*buffer) && buffer->lpszScriptBuffer &&
- (global_script->text = strdupAW( buffer->lpszScriptBuffer, buffer->dwScriptBufferSize ))) ret = TRUE;
- else if ((global_script->text = load_script( tmpfile ))) ret = TRUE;
LeaveCriticalSection( &cs_jsproxy );
return ret;
More information about the wine-cvs
mailing list