winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2006
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
512 discussions
Start a n
N
ew thread
qingdoa daoo : comctl32: Fix an unsigned comparison to zero.
by Alexandre Julliard
20 Apr '06
20 Apr '06
Module: wine Branch: refs/heads/master Commit: d2f59fe4554313700487724a98762715a8098f62 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=d2f59fe4554313700487724…
Author: qingdoa daoo <qingdao33122(a)yahoo.com> Date: Wed Apr 19 17:53:28 2006 -0700 comctl32: Fix an unsigned comparison to zero. --- dlls/comctl32/toolbar.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 64be7ec..41a531a 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -6167,7 +6167,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wPa * NM_CLICK with the NMMOUSE structure. */ nmmouse.dwHitInfo = nHit; - if (nmmouse.dwHitInfo < 0) + if (nHit < 0) nmmouse.dwItemSpec = -1; else {
1
0
0
0
James Hawkins : advpack: Set the ldids of the install section in install_init.
by Alexandre Julliard
20 Apr '06
20 Apr '06
Module: wine Branch: refs/heads/master Commit: aabb5d044361dec18dab8a300dbda22a0fd14d24 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=aabb5d044361dec18dab8a3…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Apr 20 01:36:39 2006 -0500 advpack: Set the ldids of the install section in install_init. --- dlls/advpack/advpack.c | 2 +- dlls/advpack/advpack_private.h | 1 + dlls/advpack/install.c | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/advpack/advpack.c b/dlls/advpack/advpack.c index 791cb88..cde1c52 100644 --- a/dlls/advpack/advpack.c +++ b/dlls/advpack/advpack.c @@ -92,7 +92,7 @@ static void get_dest_dir(HINF hInf, PCWS } /* loads the LDIDs specified in the install section of an INF */ -static void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir) +void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir) { WCHAR field[MAX_FIELD_LENGTH]; WCHAR line[MAX_FIELD_LENGTH]; diff --git a/dlls/advpack/advpack_private.h b/dlls/advpack/advpack_private.h index a36b32b..8da353c 100644 --- a/dlls/advpack/advpack_private.h +++ b/dlls/advpack/advpack_private.h @@ -22,6 +22,7 @@ #ifndef __ADVPACK_PRIVATE_H #define __ADVPACK_PRIVATE_H LPWSTR get_parameter(LPWSTR *params, WCHAR separator); +void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir); HRESULT launch_exe(LPCWSTR cmd, LPCWSTR dir, HANDLE *phEXE); HRESULT do_ocx_reg(HMODULE hocx, BOOL do_reg); diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c index d280a42..252fd89 100644 --- a/dlls/advpack/install.c +++ b/dlls/advpack/install.c @@ -259,7 +259,8 @@ HRESULT install_init(LPCWSTR inf_filenam if (info->hinf == INVALID_HANDLE_VALUE) return ADV_HRESULT(GetLastError()); - /* FIXME: set the ldids of the install section */ + set_ldids(info->hinf, info->install_sec, info->working_dir); + /* FIXME: check that the INF is advanced */ info->flags = flags;
1
0
0
0
James Hawkins : advpack: Add stub handling for the RegisterOCXs command.
by Alexandre Julliard
20 Apr '06
20 Apr '06
Module: wine Branch: refs/heads/master Commit: 704e70ff7cb173bd63e6f89f821cc763bf9920ee URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=704e70ff7cb173bd63e6f89…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Apr 20 01:36:26 2006 -0500 advpack: Add stub handling for the RegisterOCXs command. --- dlls/advpack/install.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 82 insertions(+), 0 deletions(-) diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c index 538451a..d280a42 100644 --- a/dlls/advpack/install.c +++ b/dlls/advpack/install.c @@ -54,6 +54,18 @@ typedef struct _ADVInfo BOOL need_reboot; } ADVInfo; +typedef HRESULT (*iterate_fields_func)(HINF hinf, PCWSTR field, void *arg); + +/* Advanced INF commands */ +static const WCHAR RegisterOCXs[] = {'R','e','g','i','s','t','e','r','O','C','X','s',0}; + +/* Advanced INF callbacks */ +static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, void *arg) +{ + FIXME("Unhandled command: RegisterOCXs\n"); + return E_FAIL; +} + /* sequentially returns pointers to parameters in a parameter list * returns NULL if the parameter is empty, e.g. one,,three */ LPWSTR get_parameter(LPWSTR *params, WCHAR separator) @@ -86,6 +98,61 @@ static BOOL is_full_path(LPWSTR path) return FALSE; } +/* retrieves the contents of a field, dynamically growing the buffer if necessary */ +static WCHAR *get_field_string(INFCONTEXT *context, DWORD index, WCHAR *buffer, + WCHAR *static_buffer, DWORD *size) +{ + DWORD required; + + if (SetupGetStringFieldW(context, index, buffer, *size, &required)) return buffer; + + if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + /* now grow the buffer */ + if (buffer != static_buffer) HeapFree(GetProcessHeap(), 0, buffer); + if (!(buffer = HeapAlloc(GetProcessHeap(), 0, required*sizeof(WCHAR)))) return NULL; + *size = required; + if (SetupGetStringFieldW(context, index, buffer, *size, &required)) return buffer; + } + + if (buffer != static_buffer) HeapFree(GetProcessHeap(), 0, buffer); + return NULL; +} + +/* iterates over all fields of a certain key of a certain section */ +static HRESULT iterate_section_fields(HINF hinf, PCWSTR section, PCWSTR key, + iterate_fields_func callback, void *arg) +{ + WCHAR static_buffer[200]; + WCHAR *buffer = static_buffer; + DWORD size = sizeof(static_buffer) / sizeof(WCHAR); + INFCONTEXT context; + HRESULT hr = E_FAIL; + + BOOL ok = SetupFindFirstLineW(hinf, section, key, &context); + while (ok) + { + UINT i, count = SetupGetFieldCount(&context); + + for (i = 1; i <= count; i++) + { + if (!(buffer = get_field_string(&context, i, buffer, static_buffer, &size))) + goto done; + + if ((hr = callback(hinf, buffer, arg)) != S_OK) + goto done; + } + + ok = SetupFindNextMatchLineW(&context, key, &context); + } + + hr = S_OK; + + done: + if (buffer && buffer != static_buffer) HeapFree(GetProcessHeap(), 0, buffer); + return hr; +} + /* performs a setupapi-level install of the INF file */ static HRESULT spapi_install(ADVInfo *info) { @@ -121,6 +188,17 @@ static HRESULT spapi_install(ADVInfo *in return S_OK; } +/* processes the Advanced INF commands */ +static HRESULT adv_install(ADVInfo *info) +{ + HRESULT hr; + + hr = iterate_section_fields(info->hinf, info->install_sec, + RegisterOCXs, register_ocxs_callback, NULL); + + return hr; +} + /* loads the INF file and performs checks on it */ HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec, LPCWSTR working_dir, DWORD flags, ADVInfo *info) @@ -586,6 +664,10 @@ HRESULT WINAPI RunSetupCommandW(HWND hWn goto done; hr = spapi_install(&info); + if (hr != S_OK) + goto done; + + hr = adv_install(&info); done: install_release(&info);
1
0
0
0
James Hawkins : advpack: Don' t TRACE the internals of the setup pointer as it can be NULL.
by Alexandre Julliard
20 Apr '06
20 Apr '06
Module: wine Branch: refs/heads/master Commit: 92f979b00530867d301858e0217e0a580fdc0ccd URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=92f979b00530867d301858e…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Apr 20 01:35:55 2006 -0500 advpack: Don't TRACE the internals of the setup pointer as it can be NULL. --- dlls/advpack/install.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c index 517529f..538451a 100644 --- a/dlls/advpack/install.c +++ b/dlls/advpack/install.c @@ -229,9 +229,7 @@ HRESULT WINAPI DoInfInstall(const SETUPC HINF hinf; void *callback_context; - TRACE("%p, %s, %s, %s, %s\n", setup->hwnd, debugstr_a(setup->title), - debugstr_a(setup->inf_name), debugstr_a(setup->dir), - debugstr_a(setup->section_name)); + TRACE("(%p)\n", setup); hinf = SetupOpenInfFileA(setup->inf_name, NULL, INF_STYLE_WIN4, NULL); if (hinf == INVALID_HANDLE_VALUE) return HRESULT_FROM_WIN32(GetLastError());
1
0
0
0
James Hawkins : advpack: LaunchINFSectionExA is no longer a stub.
by Alexandre Julliard
20 Apr '06
20 Apr '06
Module: wine Branch: refs/heads/master Commit: 49a29a1878829fb8c94639c8cfa86f2902d7131a URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=49a29a1878829fb8c94639c…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Apr 20 01:35:40 2006 -0500 advpack: LaunchINFSectionExA is no longer a stub. --- dlls/advpack/install.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c index eeffa9e..517529f 100644 --- a/dlls/advpack/install.c +++ b/dlls/advpack/install.c @@ -379,7 +379,7 @@ HRESULT WINAPI LaunchINFSectionExA(HWND UNICODE_STRING cmd; HRESULT hr; - TRACE("(%p, %p, %s, %i): stub\n", hWnd, hInst, debugstr_a(cmdline), show); + TRACE("(%p, %p, %s, %i)\n", hWnd, hInst, debugstr_a(cmdline), show); RtlCreateUnicodeStringFromAsciiz(&cmd, cmdline);
1
0
0
0
Mike McCormack : rpcrt4: Use a separate function to open each protseq.
by Alexandre Julliard
20 Apr '06
20 Apr '06
Module: wine Branch: refs/heads/master Commit: 0ee6f59cc02c6e092049f235b440eca46a215a4d URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=0ee6f59cc02c6e092049f23…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Thu Apr 20 19:52:26 2006 +0900 rpcrt4: Use a separate function to open each protseq. --- dlls/rpcrt4/rpc_binding.c | 82 ++++++++++++++++++++++++++------------------- 1 files changed, 47 insertions(+), 35 deletions(-) diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c index 9b3e705..792adcf 100644 --- a/dlls/rpcrt4/rpc_binding.c +++ b/dlls/rpcrt4/rpc_binding.c @@ -190,48 +190,60 @@ static RPC_STATUS rpcrt4_open_pipe(RpcCo return RPC_S_OK; } -RPC_STATUS RPCRT4_OpenConnection(RpcConnection* Connection) +static RPC_STATUS rpcrt4_ncalrpc_open(RpcConnection* Connection) { - RPC_STATUS r = RPC_S_OK; + static LPCSTR prefix = "\\\\.\\pipe\\lrpc\\"; + RPC_STATUS r; + LPSTR pname; + + /* protseq=ncalrpc: supposed to use NT LPC ports, + * but we'll implement it with named pipes for now */ + pname = HeapAlloc(GetProcessHeap(), 0, strlen(prefix) + strlen(Connection->Endpoint) + 1); + strcat(strcpy(pname, prefix), Connection->Endpoint); + + if (Connection->server) + r = rpcrt4_connect_pipe(Connection, pname); + else + r = rpcrt4_open_pipe(Connection, pname, TRUE); + HeapFree(GetProcessHeap(), 0, pname); + + return r; +} + +static RPC_STATUS rpcrt4_ncacn_np_open(RpcConnection* Connection) +{ + static LPCSTR prefix = "\\\\."; + RPC_STATUS r; + LPSTR pname; + + /* protseq=ncacn_np: named pipes */ + pname = HeapAlloc(GetProcessHeap(), 0, strlen(prefix) + strlen(Connection->Endpoint) + 1); + strcat(strcpy(pname, prefix), Connection->Endpoint); + if (Connection->server) + r = rpcrt4_connect_pipe(Connection, pname); + else + r = rpcrt4_open_pipe(Connection, pname, FALSE); + HeapFree(GetProcessHeap(), 0, pname); + + return r; +} +RPC_STATUS RPCRT4_OpenConnection(RpcConnection* Connection) +{ TRACE("(Connection == ^%p)\n", Connection); /* already connected? */ if (Connection->conn) - return r; + return RPC_S_OK; - /* protseq=ncalrpc: supposed to use NT LPC ports, - * but we'll implement it with named pipes for now */ - if (strcmp(Connection->Protseq, "ncalrpc") == 0) { - static LPCSTR prefix = "\\\\.\\pipe\\lrpc\\"; - LPSTR pname; - pname = HeapAlloc(GetProcessHeap(), 0, strlen(prefix) + strlen(Connection->Endpoint) + 1); - strcat(strcpy(pname, prefix), Connection->Endpoint); - - if (Connection->server) - r = rpcrt4_connect_pipe(Connection, pname); - else - r = rpcrt4_open_pipe(Connection, pname, TRUE); - HeapFree(GetProcessHeap(), 0, pname); - } - /* protseq=ncacn_np: named pipes */ - else if (strcmp(Connection->Protseq, "ncacn_np") == 0) { - static LPCSTR prefix = "\\\\."; - LPSTR pname; - pname = HeapAlloc(GetProcessHeap(), 0, strlen(prefix) + strlen(Connection->Endpoint) + 1); - strcat(strcpy(pname, prefix), Connection->Endpoint); - if (Connection->server) - r = rpcrt4_connect_pipe(Connection, pname); - else - r = rpcrt4_open_pipe(Connection, pname, FALSE); - HeapFree(GetProcessHeap(), 0, pname); - } - else { - ERR("protseq %s not supported\n", Connection->Protseq); - r = RPC_S_PROTSEQ_NOT_SUPPORTED; - } - - return r; + if (strcmp(Connection->Protseq, "ncalrpc") == 0) + return rpcrt4_ncalrpc_open(Connection); + + if (strcmp(Connection->Protseq, "ncacn_np") == 0) + return rpcrt4_ncacn_np_open(Connection); + + ERR("protseq %s not supported\n", Connection->Protseq); + return RPC_S_PROTSEQ_NOT_SUPPORTED; } RPC_STATUS RPCRT4_CloseConnection(RpcConnection* Connection)
1
0
0
0
Mike McCormack : rpcrt4: Abstract access to the connection' s waitable object.
by Alexandre Julliard
20 Apr '06
20 Apr '06
Module: wine Branch: refs/heads/master Commit: 3a4a76be2f8cf4fb3237c97fd10775b3891e8c31 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=3a4a76be2f8cf4fb3237c97…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Thu Apr 20 18:02:43 2006 +0900 rpcrt4: Abstract access to the connection's waitable object. --- dlls/rpcrt4/rpc_server.c | 25 ++++++++++++++++--------- 1 files changed, 16 insertions(+), 9 deletions(-) diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 96b3a44..a7581f3 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -455,6 +455,11 @@ static void RPCRT4_new_client(RpcConnect CloseHandle( thread ); } +static HANDLE rpcrt4_conn_get_wait_object(RpcConnection *conn) +{ + return conn->ovl.hEvent; +} + static DWORD CALLBACK RPCRT4_server_thread(LPVOID the_arg) { HANDLE m_event = mgr_event, b_handle; @@ -476,16 +481,17 @@ static DWORD CALLBACK RPCRT4_server_thre conn = cps->conn; while (conn) { RPCRT4_OpenConnection(conn); - if (conn->ovl.hEvent) count++; + if (rpcrt4_conn_get_wait_object(conn)) + count++; conn = conn->Next; } cps = cps->Next; } /* make array of connections */ if (objs) - objs = HeapReAlloc(GetProcessHeap(), 0, objs, count*sizeof(HANDLE)); + objs = HeapReAlloc(GetProcessHeap(), 0, objs, count*sizeof(HANDLE)); else - objs = HeapAlloc(GetProcessHeap(), 0, count*sizeof(HANDLE)); + objs = HeapAlloc(GetProcessHeap(), 0, count*sizeof(HANDLE)); objs[0] = m_event; count = 1; @@ -493,7 +499,8 @@ static DWORD CALLBACK RPCRT4_server_thre while (cps) { conn = cps->conn; while (conn) { - if (conn->ovl.hEvent) objs[count++] = conn->ovl.hEvent; + if ((objs[count] = rpcrt4_conn_get_wait_object(conn))) + count++; conn = conn->Next; } cps = cps->Next; @@ -529,18 +536,18 @@ static DWORD CALLBACK RPCRT4_server_thre while (cps) { conn = cps->conn; while (conn) { - if (conn->ovl.hEvent == b_handle) break; + if (b_handle == rpcrt4_conn_get_wait_object(conn)) break; conn = conn->Next; } if (conn) break; cps = cps->Next; } cconn = NULL; - if (conn) RPCRT4_SpawnConnection(&cconn, conn); - LeaveCriticalSection(&server_cs); - if (!conn) { + if (conn) + RPCRT4_SpawnConnection(&cconn, conn); + else ERR("failed to locate connection for handle %p\n", b_handle); - } + LeaveCriticalSection(&server_cs); if (cconn) RPCRT4_new_client(cconn); } }
1
0
0
0
Robert Shearman : widl: Prevent NULL pointer de-refs on "void *" types.
by Alexandre Julliard
20 Apr '06
20 Apr '06
Module: wine Branch: refs/heads/master Commit: 555cf382691e629dfabc137a22d9b7fc6b3f1108 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=555cf382691e629dfabc137…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Apr 20 11:47:00 2006 +0100 widl: Prevent NULL pointer de-refs on "void *" types. --- tools/widl/write_msft.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index ea48a9a..d051aa5 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -783,16 +783,17 @@ static int encode_type( case VT_PTR: { int next_vt; - while((next_vt = get_type_vt(type->ref)) == 0) { - if(type->ref == NULL) { - next_vt = VT_VOID; + for(next_vt = 0; type->ref; type = type->ref) { + next_vt = get_type_vt(type->ref); + if (next_vt != 0) break; - } - type = type->ref; } + /* if no type found then it must be void */ + if (next_vt == 0) + next_vt = VT_VOID; encode_type(typelib, next_vt, type->ref, &target_type, NULL, NULL, &child_size); - if(type->ref->type == RPC_FC_IP) { + if(type->ref && (type->ref->type == RPC_FC_IP)) { chat("encode_type: skipping ptr\n"); *encoded_type = target_type; *width = 4;
1
0
0
0
Robert Shearman : wininet: Don' t allocate memory for the thread error structure until it is needed.
by Alexandre Julliard
20 Apr '06
20 Apr '06
Module: wine Branch: refs/heads/master Commit: d133ff9afb07c2e2516efc411cccc00c833a1c58 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=d133ff9afb07c2e2516efc4…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Apr 20 11:46:38 2006 +0100 wininet: Don't allocate memory for the thread error structure until it is needed. Don't allocate memory for the thread error structure until it is needed, as it is quite large and wastes memory for threads that don't call any wininet function. --- dlls/wininet/internet.c | 51 +++++++++++++++++++++++++++++++++-------------- 1 files changed, 36 insertions(+), 15 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 0402d82..d504981 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -283,13 +283,6 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, WININET_hModule = (HMODULE)hinstDLL; case DLL_THREAD_ATTACH: - { - LPWITHREADERROR lpwite = HeapAlloc(GetProcessHeap(), 0, sizeof(WITHREADERROR)); - if (NULL == lpwite) - return FALSE; - - TlsSetValue(g_dwTlsErrIndex, (LPVOID)lpwite); - } break; case DLL_THREAD_DETACH: @@ -651,14 +644,22 @@ BOOL WINAPI InternetGetLastResponseInfoA TRACE("\n"); - *lpdwError = lpwite->dwError; - if (lpwite->dwError) + if (lpwite) { - memcpy(lpszBuffer, lpwite->response, *lpdwBufferLength); - *lpdwBufferLength = strlen(lpszBuffer); + *lpdwError = lpwite->dwError; + if (lpwite->dwError) + { + memcpy(lpszBuffer, lpwite->response, *lpdwBufferLength); + *lpdwBufferLength = strlen(lpszBuffer); + } + else + *lpdwBufferLength = 0; } else + { + *lpdwError = 0; *lpdwBufferLength = 0; + } return TRUE; } @@ -680,14 +681,22 @@ BOOL WINAPI InternetGetLastResponseInfoW TRACE("\n"); - *lpdwError = lpwite->dwError; - if (lpwite->dwError) + if (lpwite) { - memcpy(lpszBuffer, lpwite->response, *lpdwBufferLength); - *lpdwBufferLength = lstrlenW(lpszBuffer); + *lpdwError = lpwite->dwError; + if (lpwite->dwError) + { + memcpy(lpszBuffer, lpwite->response, *lpdwBufferLength); + *lpdwBufferLength = lstrlenW(lpszBuffer); + } + else + *lpdwBufferLength = 0; } else + { + *lpdwError = 0; *lpdwBufferLength = 0; + } return TRUE; } @@ -3048,6 +3057,12 @@ void INTERNET_SetLastError(DWORD dwError { LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); + if (!lpwite) + { + lpwite = HeapAlloc(GetProcessHeap(), 0, sizeof(*lpwite)); + TlsSetValue(g_dwTlsErrIndex, lpwite); + } + SetLastError(dwError); if(lpwite) lpwite->dwError = dwError; @@ -3065,6 +3080,7 @@ void INTERNET_SetLastError(DWORD dwError DWORD INTERNET_GetLastError(void) { LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); + if (!lpwite) return 0; /* TlsGetValue clears last error, so set it again here */ SetLastError(lpwite->dwError); return lpwite->dwError; @@ -3476,6 +3492,11 @@ static VOID INTERNET_ExecuteWork(void) LPSTR INTERNET_GetResponseBuffer(void) { LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); + if (!lpwite) + { + lpwite = HeapAlloc(GetProcessHeap(), 0, sizeof(*lpwite)); + TlsSetValue(g_dwTlsErrIndex, lpwite); + } TRACE("\n"); return lpwite->response; }
1
0
0
0
Robert Shearman : rpcrt4: Don' t apply the offset to the pointer passed to callback conformance functions.
by Alexandre Julliard
20 Apr '06
20 Apr '06
Module: wine Branch: refs/heads/master Commit: 0ced865aa1075a0dbba3a9e93972df1091aebc8c URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=0ced865aa1075a0dbba3a9e…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Thu Apr 20 11:45:40 2006 +0100 rpcrt4: Don't apply the offset to the pointer passed to callback conformance functions. --- dlls/rpcrt4/ndr_marshall.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 4868723..6830530 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -358,16 +358,16 @@ PFORMAT_STRING ComputeConformanceOrVaria switch (pFormat[0] & 0xf0) { case RPC_FC_NORMAL_CONFORMANCE: TRACE("normal conformance, ofs=%d\n", ofs); - ptr = pMemory + ofs; + ptr = pMemory; break; case RPC_FC_POINTER_CONFORMANCE: TRACE("pointer conformance, ofs=%d\n", ofs); - ptr = pStubMsg->Memory + ofs; + ptr = pStubMsg->Memory; break; case RPC_FC_TOP_LEVEL_CONFORMANCE: TRACE("toplevel conformance, ofs=%d\n", ofs); if (pStubMsg->StackTop) { - ptr = pStubMsg->StackTop + ofs; + ptr = pStubMsg->StackTop; } else { /* -Os mode, *pCount is already set */ @@ -382,7 +382,7 @@ PFORMAT_STRING ComputeConformanceOrVaria case RPC_FC_TOP_LEVEL_MULTID_CONFORMANCE: FIXME("toplevel multidimensional conformance, ofs=%d\n", ofs); if (pStubMsg->StackTop) { - ptr = pStubMsg->StackTop + ofs; + ptr = pStubMsg->StackTop; } else { /* ? */ @@ -395,7 +395,7 @@ PFORMAT_STRING ComputeConformanceOrVaria switch (pFormat[1]) { case RPC_FC_DEREFERENCE: - ptr = *(LPVOID*)ptr; + ptr = *(LPVOID*)((char *)ptr + ofs); break; case RPC_FC_CALLBACK: { @@ -410,6 +410,7 @@ PFORMAT_STRING ComputeConformanceOrVaria goto finish_conf; } default: + ptr = (char *)ptr + ofs; break; }
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
52
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Results per page:
10
25
50
100
200