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 2018
----- 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
2 participants
542 discussions
Start a n
N
ew thread
Zebediah Figura : msi: Make MsiEnumComponentCosts RPC-compatible.
by Alexandre Julliard
26 Apr '18
26 Apr '18
Module: wine Branch: master Commit: efb8ed4748e75e88240cb27f3f917f6ed3446901 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=efb8ed4748e75e88240cb27f…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Apr 25 20:54:38 2018 -0500 msi: Make MsiEnumComponentCosts RPC-compatible. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/msi.c | 20 ++++----- dlls/msi/package.c | 9 ++-- dlls/msi/tests/custom.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++- dlls/msi/winemsi.idl | 4 +- 4 files changed, 124 insertions(+), 20 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index c0af7f5..2ec94a1 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -2005,25 +2005,21 @@ UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD i if (!drive || !buflen || !cost || !temp) return ERROR_INVALID_PARAMETER; if (!(package = msihandle2msiinfo( handle, MSIHANDLETYPE_PACKAGE ))) { + WCHAR buffer[3]; MSIHANDLE remote; - HRESULT hr; - BSTR bname = NULL; if (!(remote = msi_get_remote(handle))) return ERROR_INVALID_HANDLE; - if (component && !(bname = SysAllocString( component ))) - return ERROR_OUTOFMEMORY; - - hr = remote_EnumComponentCosts(remote, bname, index, state, drive, buflen, cost, temp); - - SysFreeString( bname ); - if (FAILED(hr)) + r = remote_EnumComponentCosts(remote, component, index, state, buffer, cost, temp); + if (r == ERROR_SUCCESS) { - if (HRESULT_FACILITY(hr) == FACILITY_WIN32) return HRESULT_CODE(hr); - return ERROR_FUNCTION_FAILED; + lstrcpynW(drive, buffer, *buflen); + if (*buflen < 3) + r = ERROR_MORE_DATA; + *buflen = 2; } - return ERROR_SUCCESS; + return r; } if (!msi_get_property_int( package->db, szCostingComplete, 0 )) diff --git a/dlls/msi/package.c b/dlls/msi/package.c index b633250..067e571 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -2589,12 +2589,11 @@ UINT __cdecl remote_GetFeatureCost(MSIHANDLE hinst, LPCWSTR feature, return MsiGetFeatureCostW(hinst, feature, cost_tree, state, cost); } -HRESULT __cdecl remote_EnumComponentCosts(MSIHANDLE hinst, BSTR component, - DWORD index, INSTALLSTATE state, BSTR drive, - DWORD *buflen, INT *cost, INT *temp) +UINT __cdecl remote_EnumComponentCosts(MSIHANDLE hinst, LPCWSTR component, + DWORD index, INSTALLSTATE state, LPWSTR drive, INT *cost, INT *temp) { - UINT r = MsiEnumComponentCostsW(hinst, component, index, state, drive, buflen, cost, temp); - return HRESULT_FROM_WIN32(r); + DWORD size = 3; + return MsiEnumComponentCostsW(hinst, component, index, state, drive, &size, cost, temp); } UINT msi_package_add_info(MSIPACKAGE *package, DWORD context, DWORD options, diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index ecd172a..35b3d71 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -857,7 +857,13 @@ static void test_format_record(MSIHANDLE hinst) static void test_costs(MSIHANDLE hinst) { - INT cost; + static const WCHAR oneW[] = {'O','n','e',0}; + static const WCHAR xyzW[] = {'C',':',0}; + static const WCHAR xyW[] = {'C',0}; + WCHAR bufferW[10]; + char buffer[10]; + int cost, temp; + DWORD sz; UINT r; cost = 0xdead; @@ -872,6 +878,109 @@ static void test_costs(MSIHANDLE hinst) r = MsiGetFeatureCostA(hinst, "One", MSICOSTTREE_CHILDREN, INSTALLSTATE_LOCAL, &cost); ok(hinst, !r, "got %u\n", r); todo_wine_ok(hinst, cost == 8, "got %d\n", cost); + + sz = cost = temp = 0xdead; + r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, NULL, &sz, &cost, &temp); + ok(hinst, r == ERROR_INVALID_PARAMETER, "got %u\n", r); + ok(hinst, sz == 0xdead, "got size %d\n", sz); + ok(hinst, cost == 0xdead, "got cost %d\n", cost); + ok(hinst, temp == 0xdead, "got temp %d\n", temp); + + cost = temp = 0xdead; + r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, buffer, NULL, &cost, &temp); + ok(hinst, r == ERROR_INVALID_PARAMETER, "got %u\n", r); + ok(hinst, cost == 0xdead, "got cost %d\n", cost); + ok(hinst, temp == 0xdead, "got temp %d\n", temp); + + sz = temp = 0xdead; + r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, buffer, &sz, NULL, &temp); + ok(hinst, r == ERROR_INVALID_PARAMETER, "got %u\n", r); + ok(hinst, sz == 0xdead, "got size %d\n", sz); + ok(hinst, temp == 0xdead, "got temp %d\n", temp); + + sz = cost = 0xdead; + r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, buffer, &sz, &cost, NULL); + ok(hinst, r == ERROR_INVALID_PARAMETER, "got %u\n", r); + ok(hinst, sz == 0xdead, "got size %d\n", sz); + ok(hinst, cost == 0xdead, "got cost %d\n", cost); + + cost = temp = 0xdead; + sz = sizeof(buffer); + r = MsiEnumComponentCostsA(hinst, NULL, 0, INSTALLSTATE_LOCAL, buffer, &sz, &cost, &temp); + ok(hinst, !r, "got %u\n", r); + ok(hinst, sz == 2, "got size %u\n", sz); + ok(hinst, !strcmp(buffer, "C:"), "got '%s'\n", buffer); + ok(hinst, !cost, "got cost %d\n", cost); + ok(hinst, temp && temp != 0xdead, "got temp %d\n", temp); + + cost = temp = 0xdead; + sz = sizeof(buffer); + r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, buffer, &sz, &cost, &temp); + ok(hinst, !r, "got %u\n", r); + ok(hinst, sz == 2, "got size %u\n", sz); + ok(hinst, !strcmp(buffer, "C:"), "got '%s'\n", buffer); + ok(hinst, cost == 8, "got cost %d\n", cost); + ok(hinst, !temp, "got temp %d\n", temp); + + /* same string behaviour */ + cost = temp = 0xdead; + sz = 0; + strcpy(buffer,"q"); + r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, buffer, &sz, &cost, &temp); + ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); + ok(hinst, !strcmp(buffer, "q"), "got \"%s\"\n", buffer); + todo_wine_ok(hinst, sz == 4, "got size %u\n", sz); + ok(hinst, cost == 8, "got cost %d\n", cost); + ok(hinst, !temp, "got temp %d\n", temp); + + sz = 1; + strcpy(buffer,"x"); + r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, buffer, &sz, &cost, &temp); + ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); + todo_wine_ok(hinst, !buffer[0], "got \"%s\"\n", buffer); + todo_wine_ok(hinst, sz == 4, "got size %u\n", sz); + + sz = 2; + strcpy(buffer,"x"); + r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, buffer, &sz, &cost, &temp); + ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); + todo_wine_ok(hinst, !strcmp(buffer, "C"), "got \"%s\"\n", buffer); + todo_wine_ok(hinst, sz == 4, "got size %u\n", sz); + + sz = 3; + strcpy(buffer,"x"); + r = MsiEnumComponentCostsA(hinst, "One", 0, INSTALLSTATE_LOCAL, buffer, &sz, &cost, &temp); + ok(hinst, !r, "got %u\n", r); + ok(hinst, !strcmp(buffer, "C:"), "got \"%s\"\n", buffer); + ok(hinst, sz == 2, "got size %u\n", sz); + + sz = 0; + bufferW[0] = 'q'; + r = MsiEnumComponentCostsW(hinst, oneW, 0, INSTALLSTATE_LOCAL, bufferW, &sz, &cost, &temp); + ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); + ok(hinst, bufferW[0] == 'q', "got %s\n", dbgstr_w(bufferW)); + ok(hinst, sz == 2, "got size %u\n", sz); + + sz = 1; + bufferW[0] = 'q'; + r = MsiEnumComponentCostsW(hinst, oneW, 0, INSTALLSTATE_LOCAL, bufferW, &sz, &cost, &temp); + ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); + ok(hinst, !bufferW[0], "got %s\n", dbgstr_w(bufferW)); + ok(hinst, sz == 2, "got size %u\n", sz); + + sz = 2; + bufferW[0] = 'q'; + r = MsiEnumComponentCostsW(hinst, oneW, 0, INSTALLSTATE_LOCAL, bufferW, &sz, &cost, &temp); + ok(hinst, r == ERROR_MORE_DATA, "got %u\n", r); + ok(hinst, !lstrcmpW(bufferW, xyW), "got %s\n", dbgstr_w(bufferW)); + ok(hinst, sz == 2, "got size %u\n", sz); + + sz = 3; + bufferW[0] = 'q'; + r = MsiEnumComponentCostsW(hinst, oneW, 0, INSTALLSTATE_LOCAL, bufferW, &sz, &cost, &temp); + ok(hinst, !r, "got %u\n", r); + ok(hinst, !lstrcmpW(bufferW, xyzW), "got %s\n", dbgstr_w(bufferW)); + ok(hinst, sz == 2, "got size %u\n", sz); } /* Main test. Anything that doesn't depend on a specific install configuration diff --git a/dlls/msi/winemsi.idl b/dlls/msi/winemsi.idl index fa98ac0..3884500 100644 --- a/dlls/msi/winemsi.idl +++ b/dlls/msi/winemsi.idl @@ -91,8 +91,8 @@ interface IWineMsiRemote UINT remote_FormatRecord( [in] MSIHANDLE hinst, [in] struct wire_record *record, [out, string] LPWSTR *value); MSICONDITION remote_EvaluateCondition( [in] MSIHANDLE hinst, [in, string] LPCWSTR condition ); UINT remote_GetFeatureCost( [in] MSIHANDLE hinst, [in, string] LPCWSTR feature, [in] MSICOSTTREE cost_tree, [in] INSTALLSTATE state, [out] INT *cost ); - HRESULT remote_EnumComponentCosts( [in] MSIHANDLE hinst, [in] BSTR component, [in] DWORD index, [in] INSTALLSTATE state, - [out, size_is(*buflen)] BSTR drive, [in, out] DWORD *buflen, [out] INT *cost, [out] INT *temp ); + UINT remote_EnumComponentCosts( [in] MSIHANDLE hinst, [in, string, unique] LPCWSTR component, [in] DWORD index, [in] INSTALLSTATE state, + [out, string, size_is(3)] LPWSTR drive, [out] INT *cost, [out] INT *temp ); HRESULT remote_GetActionInfo( [in] LPCGUID guid, [out] INT *type, [out] BSTR *dllname, [out] BSTR *function, [out] MSIHANDLE *package );
1
0
0
0
Dmitry Timoshkov : mstask: Write correct trigger count to a job file.
by Alexandre Julliard
26 Apr '18
26 Apr '18
Module: wine Branch: master Commit: e7987b1e4baef4230972c02ba23c90685ecaff86 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e7987b1e4baef4230972c02b…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Apr 26 17:17:35 2018 +0800 mstask: Write correct trigger count to a job file. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index f93aff1..986faa1 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -1133,9 +1133,6 @@ static HRESULT write_triggers(ITask *task, HANDLE hfile) hr = ITask_GetTriggerCount(task, &count); if (hr != S_OK) return hr; - if (!WriteFile(hfile, &count, sizeof(count), &size, NULL)) - return HRESULT_FROM_WIN32(GetLastError()); - /* Windows saves a .job with at least 1 trigger */ if (!count) { @@ -1146,6 +1143,9 @@ static HRESULT write_triggers(ITask *task, HANDLE hfile) count = 1; } + if (!WriteFile(hfile, &count, sizeof(count), &size, NULL)) + return HRESULT_FROM_WIN32(GetLastError()); + for (i = 0; i < count; i++) { TASK_TRIGGER task_trigger;
1
0
0
0
Dmitry Timoshkov : mstask: Correctly initialize trigger count when loading a task.
by Alexandre Julliard
26 Apr '18
26 Apr '18
Module: wine Branch: master Commit: ce57e5c4d7bd7e525464840dcfe2af84acc372b5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ce57e5c4d7bd7e525464840d…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Apr 26 17:17:33 2018 +0800 mstask: Correctly initialize trigger count when loading a task. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index 8672104..f93aff1 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -968,17 +968,17 @@ static HRESULT load_job_data(TaskImpl *This, BYTE *data, DWORD size) TRACE("trigger_offset %04x, triggers end at %04x\n", fixed->trigger_offset, (DWORD)(fixed->trigger_offset + sizeof(USHORT) + trigger_count * sizeof(TASK_TRIGGER))); - This->trigger_count = *(const USHORT *)data; - TRACE("trigger_count %u\n", trigger_count); task_trigger = (TASK_TRIGGER *)(data + sizeof(USHORT)); - if (This->trigger_count * sizeof(TASK_TRIGGER) > triggers_size) + if (trigger_count * sizeof(TASK_TRIGGER) > triggers_size) { TRACE("no space for triggers data\n"); return SCHED_E_INVALID_TASK; } - for (i = 0; i < This->trigger_count; i++) + This->trigger_count = 0; + + for (i = 0; i < trigger_count; i++) { ITaskTrigger *trigger; WORD idx; @@ -995,8 +995,8 @@ static HRESULT load_job_data(TaskImpl *This, BYTE *data, DWORD size) } } - size -= sizeof(USHORT) + This->trigger_count * sizeof(TASK_TRIGGER); - data += sizeof(USHORT) + This->trigger_count * sizeof(TASK_TRIGGER); + size -= sizeof(USHORT) + trigger_count * sizeof(TASK_TRIGGER); + data += sizeof(USHORT) + trigger_count * sizeof(TASK_TRIGGER); if (size < 2 * sizeof(USHORT) + 64) {
1
0
0
0
Dmitry Timoshkov : mstask: Improve ITask::GetNextRunTime() stub.
by Alexandre Julliard
26 Apr '18
26 Apr '18
Module: wine Branch: master Commit: 8d7d858d2bad9b0db103887661c2a275006fd9eb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8d7d858d2bad9b0db1038876…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Apr 26 17:17:31 2018 +0800 mstask: Improve ITask::GetNextRunTime() stub. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 10 +++++----- dlls/mstask/tests/task_trigger.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index 5f1dc1d..8672104 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -240,12 +240,12 @@ static HRESULT WINAPI MSTASK_ITask_GetRunTimes( return E_NOTIMPL; } -static HRESULT WINAPI MSTASK_ITask_GetNextRunTime( - ITask* iface, - SYSTEMTIME *pstNextRun) +static HRESULT WINAPI MSTASK_ITask_GetNextRunTime(ITask *iface, SYSTEMTIME *st) { - FIXME("(%p, %p): stub\n", iface, pstNextRun); - return E_NOTIMPL; + FIXME("(%p, %p): stub\n", iface, st); + + memset(st, 0, sizeof(*st)); + return SCHED_S_TASK_NO_VALID_TRIGGERS; } static HRESULT WINAPI MSTASK_ITask_SetIdleWait( diff --git a/dlls/mstask/tests/task_trigger.c b/dlls/mstask/tests/task_trigger.c index a1b5597..ab081a7 100644 --- a/dlls/mstask/tests/task_trigger.c +++ b/dlls/mstask/tests/task_trigger.c @@ -439,6 +439,44 @@ static void test_task_trigger(void) ok(ref == 0, "got %u\n", ref); } +static void test_GetNextRunTime(void) +{ + static const WCHAR task_name[] = { 'T','e','s','t','i','n','g',0 }; + static const SYSTEMTIME st_empty; + HRESULT hr; + ITask *task; + ITaskTrigger *trigger; + WORD idx; + SYSTEMTIME st; + + hr = ITaskScheduler_NewWorkItem(test_task_scheduler, task_name, &CLSID_CTask, + &IID_ITask, (IUnknown **)&task); + ok(hr == S_OK, "got %#x\n", hr); + + if (0) /* crashes under Windows */ + hr = ITask_GetNextRunTime(task, NULL); + + memset(&st, 0xff, sizeof(st)); + hr = ITask_GetNextRunTime(task, &st); + ok(hr == SCHED_S_TASK_NO_VALID_TRIGGERS, "got %#x\n", hr); + ok(!memcmp(&st, &st_empty, sizeof(st)), "got %d/%d/%d wday %d %d:%d:%d.%03d\n", + st.wDay, st.wMonth, st.wYear, st.wDayOfWeek, + st.wHour, st.wMinute, st.wSecond, st.wMilliseconds); + + hr = ITask_CreateTrigger(task, &idx, &trigger); + ok(hr == S_OK, "got %#x\n", hr); + + memset(&st, 0xff, sizeof(st)); + hr = ITask_GetNextRunTime(task, &st); + ok(hr == SCHED_S_TASK_NO_VALID_TRIGGERS, "got %#x\n", hr); + ok(!memcmp(&st, &st_empty, sizeof(st)), "got %d/%d/%d wday %d %d:%d:%d.%03d\n", + st.wDay, st.wMonth, st.wYear, st.wDayOfWeek, + st.wHour, st.wMinute, st.wSecond, st.wMilliseconds); + + ITaskTrigger_Release(trigger); + ITask_Release(task); +} + START_TEST(task_trigger) { HRESULT hr; @@ -451,6 +489,7 @@ START_TEST(task_trigger) test_SetTrigger_GetTrigger(); test_task_trigger(); + test_GetNextRunTime(); ITaskScheduler_Release(test_task_scheduler); CoUninitialize();
1
0
0
0
Dmitry Timoshkov : mstask: Add dirty flag management.
by Alexandre Julliard
26 Apr '18
26 Apr '18
Module: wine Branch: master Commit: c3a30bcfb905f3a3ddf32858291d76af98c07bd6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c3a30bcfb905f3a3ddf32858…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Apr 26 13:46:52 2018 +0800 mstask: Add dirty flag management. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index bf8cbae..5f1dc1d 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -64,6 +64,7 @@ typedef struct LPWSTR accountName; DWORD trigger_count; TASK_TRIGGER *trigger; + BOOL is_dirty; } TaskImpl; static inline TaskImpl *impl_from_ITask(ITask *iface) @@ -332,6 +333,7 @@ static HRESULT WINAPI MSTASK_ITask_SetComment(ITask *iface, LPCWSTR comment) { hr = IRegistrationInfo_put_Description(info, (BSTR)comment); IRegistrationInfo_Release(info); + This->is_dirty = TRUE; } return hr; } @@ -388,6 +390,7 @@ static HRESULT WINAPI MSTASK_ITask_SetCreator(ITask *iface, LPCWSTR creator) { hr = IRegistrationInfo_put_Author(info, (BSTR)creator); IRegistrationInfo_Release(info); + This->is_dirty = TRUE; } return hr; } @@ -511,6 +514,7 @@ static HRESULT WINAPI MSTASK_ITask_SetAccountInformation( lstrcpyW(tmp_account_name, pwszAccountName); heap_free(This->accountName); This->accountName = tmp_account_name; + This->is_dirty = TRUE; return S_OK; } @@ -540,6 +544,7 @@ static HRESULT WINAPI MSTASK_ITask_SetApplicationName(ITask *iface, LPCWSTR appn { TaskImpl *This = impl_from_ITask(iface); DWORD len; + HRESULT hr; TRACE("(%p, %s)\n", iface, debugstr_w(appname)); @@ -552,14 +557,16 @@ static HRESULT WINAPI MSTASK_ITask_SetApplicationName(ITask *iface, LPCWSTR appn if (len) { LPWSTR tmp_name; - HRESULT hr; tmp_name = heap_alloc(len * sizeof(WCHAR)); if (!tmp_name) return E_OUTOFMEMORY; len = SearchPathW(NULL, appname, NULL, len, tmp_name, NULL); if (len) + { hr = IExecAction_put_Path(This->action, tmp_name); + if (hr == S_OK) This->is_dirty = TRUE; + } else hr = HRESULT_FROM_WIN32(GetLastError()); @@ -568,7 +575,9 @@ static HRESULT WINAPI MSTASK_ITask_SetApplicationName(ITask *iface, LPCWSTR appn } /* If unable to path resolve name, simply set to appname */ - return IExecAction_put_Path(This->action, (BSTR)appname); + hr = IExecAction_put_Path(This->action, (BSTR)appname); + if (hr == S_OK) This->is_dirty = TRUE; + return hr; } static HRESULT WINAPI MSTASK_ITask_GetApplicationName(ITask *iface, LPWSTR *appname) @@ -603,6 +612,7 @@ static HRESULT WINAPI MSTASK_ITask_GetApplicationName(ITask *iface, LPWSTR *appn static HRESULT WINAPI MSTASK_ITask_SetParameters(ITask *iface, LPCWSTR params) { TaskImpl *This = impl_from_ITask(iface); + HRESULT hr; TRACE("(%p, %s)\n", iface, debugstr_w(params)); @@ -610,7 +620,9 @@ static HRESULT WINAPI MSTASK_ITask_SetParameters(ITask *iface, LPCWSTR params) if (!params || !params[0]) params = NULL; - return IExecAction_put_Arguments(This->action, (BSTR)params); + hr = IExecAction_put_Arguments(This->action, (BSTR)params); + if (hr == S_OK) This->is_dirty = TRUE; + return hr; } static HRESULT WINAPI MSTASK_ITask_GetParameters(ITask *iface, LPWSTR *params) @@ -645,13 +657,16 @@ static HRESULT WINAPI MSTASK_ITask_GetParameters(ITask *iface, LPWSTR *params) static HRESULT WINAPI MSTASK_ITask_SetWorkingDirectory(ITask * iface, LPCWSTR workdir) { TaskImpl *This = impl_from_ITask(iface); + HRESULT hr; TRACE("(%p, %s)\n", iface, debugstr_w(workdir)); if (!workdir || !workdir[0]) workdir = NULL; - return IExecAction_put_WorkingDirectory(This->action, (BSTR)workdir); + hr = IExecAction_put_WorkingDirectory(This->action, (BSTR)workdir); + if (hr == S_OK) This->is_dirty = TRUE; + return hr; } static HRESULT WINAPI MSTASK_ITask_GetWorkingDirectory(ITask *iface, LPWSTR *workdir) @@ -725,6 +740,7 @@ static HRESULT WINAPI MSTASK_ITask_SetMaxRunTime( TRACE("(%p, %d)\n", iface, dwMaxRunTime); This->maxRunTime = dwMaxRunTime; + This->is_dirty = TRUE; return S_OK; } @@ -772,11 +788,11 @@ static HRESULT WINAPI MSTASK_IPersistFile_GetClassID(IPersistFile *iface, CLSID return S_OK; } -static HRESULT WINAPI MSTASK_IPersistFile_IsDirty( - IPersistFile* iface) +static HRESULT WINAPI MSTASK_IPersistFile_IsDirty(IPersistFile *iface) { - FIXME("(%p): stub\n", iface); - return E_NOTIMPL; + TaskImpl *This = impl_from_IPersistFile(iface); + TRACE("(%p)\n", iface); + return This->is_dirty ? S_OK : S_FALSE; } static DWORD load_unicode_strings(ITask *task, BYTE *data, DWORD limit) @@ -1054,6 +1070,7 @@ static HRESULT WINAPI MSTASK_IPersistFile_Load(IPersistFile *iface, LPCOLESTR fi if (data) { hr = load_job_data(This, data, size); + if (hr == S_OK) This->is_dirty = FALSE; UnmapViewOfFile(data); } else @@ -1308,6 +1325,7 @@ static HRESULT WINAPI MSTASK_IPersistFile_Save(IPersistFile *iface, LPCOLESTR ta } hr = S_OK; + This->is_dirty = FALSE; failed: CoTaskMemFree(appname); @@ -1453,6 +1471,7 @@ HRESULT TaskConstructor(ITaskService *service, const WCHAR *name, ITask **task) This->accountName = NULL; This->trigger_count = 0; This->trigger = NULL; + This->is_dirty = FALSE; /* Default time is 3 days = 259200000 ms */ This->maxRunTime = 259200000;
1
0
0
0
Dmitry Timoshkov : mstask: Forward IPersistFile::AddRef()/Release() to parent object.
by Alexandre Julliard
26 Apr '18
26 Apr '18
Module: wine Branch: master Commit: 37ae95dfd978bb6dd3b0771808ba87fc77dd4e11 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=37ae95dfd978bb6dd3b07718…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Apr 26 13:46:49 2018 +0800 mstask: Forward IPersistFile::AddRef()/Release() to parent object. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index 99fcbc4..bf8cbae 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -754,22 +754,14 @@ static ULONG WINAPI MSTASK_IPersistFile_AddRef( IPersistFile* iface) { TaskImpl *This = impl_from_IPersistFile(iface); - ULONG ref; - TRACE("\n"); - ref = InterlockedIncrement(&This->ref); - return ref; + return ITask_AddRef(&This->ITask_iface); } static ULONG WINAPI MSTASK_IPersistFile_Release( IPersistFile* iface) { TaskImpl *This = impl_from_IPersistFile(iface); - ULONG ref; - TRACE("\n"); - ref = InterlockedDecrement(&This->ref); - if (ref == 0) - TaskDestructor(This); - return ref; + return ITask_Release(&This->ITask_iface); } static HRESULT WINAPI MSTASK_IPersistFile_GetClassID(IPersistFile *iface, CLSID *clsid)
1
0
0
0
Dmitry Timoshkov : mstask: Switch to using heap wrappers.
by Alexandre Julliard
26 Apr '18
26 Apr '18
Module: wine Branch: master Commit: 98241dfa5ac316f8cff58f486cc9f749cacce9a9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=98241dfa5ac316f8cff58f48…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Apr 26 13:46:46 2018 +0800 mstask: Switch to using heap wrappers. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mstask/task.c | 20 ++++++++++---------- dlls/mstask/task_scheduler.c | 8 ++++---- dlls/mstask/task_trigger.c | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index bfac820..99fcbc4 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -82,10 +82,10 @@ static void TaskDestructor(TaskImpl *This) if (This->action) IExecAction_Release(This->action); ITaskDefinition_Release(This->task); - HeapFree(GetProcessHeap(), 0, This->task_name); - HeapFree(GetProcessHeap(), 0, This->accountName); - HeapFree(GetProcessHeap(), 0, This->trigger); - HeapFree(GetProcessHeap(), 0, This); + heap_free(This->task_name); + heap_free(This->accountName); + heap_free(This->trigger); + heap_free(This); InterlockedDecrement(&dll_ref); } @@ -505,11 +505,11 @@ static HRESULT WINAPI MSTASK_ITask_SetAccountInformation( FIXME("Partial stub ignores passwords\n"); n = (lstrlenW(pwszAccountName) + 1); - tmp_account_name = HeapAlloc(GetProcessHeap(), 0, n * sizeof(WCHAR)); + tmp_account_name = heap_alloc(n * sizeof(WCHAR)); if (!tmp_account_name) return E_OUTOFMEMORY; lstrcpyW(tmp_account_name, pwszAccountName); - HeapFree(GetProcessHeap(), 0, This->accountName); + heap_free(This->accountName); This->accountName = tmp_account_name; return S_OK; } @@ -554,7 +554,7 @@ static HRESULT WINAPI MSTASK_ITask_SetApplicationName(ITask *iface, LPCWSTR appn LPWSTR tmp_name; HRESULT hr; - tmp_name = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + tmp_name = heap_alloc(len * sizeof(WCHAR)); if (!tmp_name) return E_OUTOFMEMORY; len = SearchPathW(NULL, appname, NULL, len, tmp_name, NULL); @@ -563,7 +563,7 @@ static HRESULT WINAPI MSTASK_ITask_SetApplicationName(ITask *iface, LPCWSTR appn else hr = HRESULT_FROM_WIN32(GetLastError()); - HeapFree(GetProcessHeap(), 0, tmp_name); + heap_free(tmp_name); return hr; } @@ -1332,7 +1332,7 @@ failed: DeleteFileW(task_name); else if (remember) { - HeapFree(GetProcessHeap(), 0, This->task_name); + heap_free(This->task_name); This->task_name = heap_strdupW(task_name); } return hr; @@ -1442,7 +1442,7 @@ HRESULT TaskConstructor(ITaskService *service, const WCHAR *name, ITask **task) hr = ITaskService_NewTask(service, 0, &taskdef); if (hr != S_OK) return hr; - This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + This = heap_alloc(sizeof(*This)); if (!This) { ITaskDefinition_Release(taskdef); diff --git a/dlls/mstask/task_scheduler.c b/dlls/mstask/task_scheduler.c index c890cb6..42e7738 100644 --- a/dlls/mstask/task_scheduler.c +++ b/dlls/mstask/task_scheduler.c @@ -59,7 +59,7 @@ static void TaskSchedulerDestructor(TaskSchedulerImpl *This) { TRACE("%p\n", This); ITaskService_Release(This->service); - HeapFree(GetProcessHeap(), 0, This); + heap_free(This); InterlockedDecrement(&dll_ref); } @@ -97,7 +97,7 @@ static ULONG WINAPI EnumWorkItems_Release(IEnumWorkItems *iface) if (ref == 0) { - HeapFree(GetProcessHeap(), 0, This); + heap_free(This); InterlockedDecrement(&dll_ref); } @@ -148,7 +148,7 @@ static HRESULT create_task_enum(IEnumWorkItems **ret) *ret = NULL; - tasks = HeapAlloc(GetProcessHeap(), 0, sizeof(*tasks)); + tasks = heap_alloc(sizeof(*tasks)); if (!tasks) return E_OUTOFMEMORY; @@ -402,7 +402,7 @@ HRESULT TaskSchedulerConstructor(LPVOID *ppObj) return hr; } - This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + This = heap_alloc(sizeof(*This)); if (!This) { ITaskService_Release(service); diff --git a/dlls/mstask/task_trigger.c b/dlls/mstask/task_trigger.c index 56bfbed..888fb66 100644 --- a/dlls/mstask/task_trigger.c +++ b/dlls/mstask/task_trigger.c @@ -86,7 +86,7 @@ static ULONG WINAPI MSTASK_ITaskTrigger_Release( ref = InterlockedDecrement(&This->ref); if (ref == 0) { - HeapFree(GetProcessHeap(), 0, This); + heap_free(This); InterlockedDecrement(&dll_ref); } return ref; @@ -288,7 +288,7 @@ HRESULT TaskTriggerConstructor(LPVOID *ppObj) SYSTEMTIME time; TRACE("(%p)\n", ppObj); - This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + This = heap_alloc(sizeof(*This)); if (!This) return E_OUTOFMEMORY;
1
0
0
0
Owen Rudge : wsdapi: Add support for sending reference parameters in the Hello message.
by Alexandre Julliard
26 Apr '18
26 Apr '18
Module: wine Branch: master Commit: 7b6b34d0c9ec2b8fe3d4c0f3b9eb0540573d9f89 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7b6b34d0c9ec2b8fe3d4c0f3…
Author: Owen Rudge <orudge(a)codeweavers.com> Date: Wed Apr 25 22:20:15 2018 +0100 wsdapi: Add support for sending reference parameters in the Hello message. Signed-off-by: Owen Rudge <orudge(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wsdapi/soap.c | 14 +++++++++++++- dlls/wsdapi/tests/discovery.c | 14 +++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/dlls/wsdapi/soap.c b/dlls/wsdapi/soap.c index e7cd651..943a6a3 100644 --- a/dlls/wsdapi/soap.c +++ b/dlls/wsdapi/soap.c @@ -77,6 +77,7 @@ static const WCHAR bodyString[] = { 'B','o','d','y', 0 }; static const WCHAR helloString[] = { 'H','e','l','l','o', 0 }; static const WCHAR endpointReferenceString[] = { 'E','n','d','p','o','i','n','t','R','e','f','e','r','e','n','c','e', 0 }; static const WCHAR addressString[] = { 'A','d','d','r','e','s','s', 0 }; +static const WCHAR referenceParametersString[] = { 'R','e','f','e','r','e','n','c','e','P','a','r','a','m','e','t','e','r','s', 0 }; static const WCHAR typesString[] = { 'T','y','p','e','s', 0 }; static const WCHAR scopesString[] = { 'S','c','o','p','e','s', 0 }; static const WCHAR xAddrsString[] = { 'X','A','d','d','r','s', 0 }; @@ -883,7 +884,7 @@ HRESULT send_hello_message(IWSDiscoveryPublisherImpl *impl, LPCWSTR id, ULONGLON const WSD_URI_LIST *xaddrs_list, const WSDXML_ELEMENT *hdr_any, const WSDXML_ELEMENT *ref_param_any, const WSDXML_ELEMENT *endpoint_ref_any, const WSDXML_ELEMENT *any) { - WSDXML_ELEMENT *body_element = NULL, *hello_element, *endpoint_reference_element; + WSDXML_ELEMENT *body_element = NULL, *hello_element, *endpoint_reference_element, *ref_params_element; struct list *discoveredNamespaces = NULL; WSDXML_NAME *body_name = NULL; WSD_SOAP_HEADER soapHeader; @@ -923,6 +924,17 @@ HRESULT send_hello_message(IWSDiscoveryPublisherImpl *impl, LPCWSTR id, ULONGLON ret = add_child_element(impl->xmlContext, endpoint_reference_element, addressingNsUri, addressString, id, NULL); if (FAILED(ret)) goto cleanup; + /* Write any reference parameters */ + if (ref_param_any != NULL) + { + ret = add_child_element(impl->xmlContext, endpoint_reference_element, addressingNsUri, referenceParametersString, + NULL, &ref_params_element); + if (FAILED(ret)) goto cleanup; + + ret = duplicate_element(ref_params_element, ref_param_any, discoveredNamespaces); + if (FAILED(ret)) goto cleanup; + } + /* Write any endpoint reference headers */ if (endpoint_ref_any != NULL) { diff --git a/dlls/wsdapi/tests/discovery.c b/dlls/wsdapi/tests/discovery.c index 5d10d3d..69cce44 100644 --- a/dlls/wsdapi/tests/discovery.c +++ b/dlls/wsdapi/tests/discovery.c @@ -514,7 +514,7 @@ static void Publish_tests(void) HRESULT rc; ULONG ref; char *msg; - WSDXML_ELEMENT *header_any_element, *body_any_element, *endpoint_any_element; + WSDXML_ELEMENT *header_any_element, *body_any_element, *endpoint_any_element, *ref_param_any_element; WSDXML_NAME header_any_name, another_name; WSDXML_NAMESPACE ns, ns2; WCHAR header_any_name_text[] = {'B','e','e','r',0}; @@ -522,6 +522,7 @@ static void Publish_tests(void) static const WCHAR header_any_text[] = {'P','u','b','l','i','s','h','T','e','s','t',0}; static const WCHAR body_any_text[] = {'B','o','d','y','T','e','s','t',0}; static const WCHAR endpoint_any_text[] = {'E','n','d','P','T','e','s','t',0}; + static const WCHAR ref_param_any_text[] = {'R','e','f','P','T','e','s','t',0}; static const WCHAR uri[] = {'h','t','t','p',':','/','/','w','i','n','e','.','t','e','s','t','/',0}; static const WCHAR prefix[] = {'w','i','n','e',0}; static const WCHAR uri2[] = {'h','t','t','p',':','/','/','m','o','r','e','.','t','e','s','t','s','/',0}; @@ -606,6 +607,9 @@ static void Publish_tests(void) rc = WSDXMLBuildAnyForSingleElement(&header_any_name, endpoint_any_text, &endpoint_any_element); ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc); + rc = WSDXMLBuildAnyForSingleElement(&header_any_name, ref_param_any_text, &ref_param_any_element); + ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc); + /* Create types list */ ns2.Uri = uri2; ns2.PreferredPrefix = prefix2; @@ -634,11 +638,12 @@ static void Publish_tests(void) /* Publish the service */ rc = IWSDiscoveryPublisher_PublishEx(publisher, publisherIdW, 1, 1, 1, sequenceIdW, &types_list, &scopes_list, - &xaddrs_list, header_any_element, NULL, NULL, endpoint_any_element, body_any_element); + &xaddrs_list, header_any_element, ref_param_any_element, NULL, endpoint_any_element, body_any_element); WSDFreeLinkedMemory(header_any_element); WSDFreeLinkedMemory(body_any_element); WSDFreeLinkedMemory(endpoint_any_element); + WSDFreeLinkedMemory(ref_param_any_element); free(types_list.Next); free(scopes_list.Next); free(xaddrs_list.Next); @@ -658,7 +663,10 @@ static void Publish_tests(void) /* Verify we've received a message */ ok(msgStorage->messageCount >= 1, "No messages received\n"); - sprintf(endpointReferenceString, "<wsa:EndpointReference><wsa:Address>%s</wsa:Address><wine:Beer>EndPTest</wine:Beer></wsa:EndpointReference>", publisherId); + sprintf(endpointReferenceString, "<wsa:EndpointReference><wsa:Address>%s</wsa:Address><wsa:ReferenceParameters>" + "<wine:Beer>RefPTest</wine:Beer></wsa:ReferenceParameters><wine:Beer>EndPTest</wine:Beer>" + "</wsa:EndpointReference>", publisherId); + sprintf(app_sequence_string, "<wsd:AppSequence InstanceId=\"1\" SequenceId=\"%s\" MessageNumber=\"1\"></wsd:AppSequence>", sequenceId);
1
0
0
0
Francois Gouget : testbot: Remove uneeded WineTestBot::{Jobs, Patches, Users} prefixes.
by Alexandre Julliard
26 Apr '18
26 Apr '18
Module: tools Branch: master Commit: 34c58beb665702d1f24dab6ea95379a80a675ec1 URL:
https://source.winehq.org/git/tools.git/?a=commit;h=34c58beb665702d1f24dab6…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Apr 26 09:45:38 2018 +0200 testbot: Remove uneeded WineTestBot::{Jobs, Patches, Users} prefixes. They are no longer needed now that the Jobs <-> Patches circular dependency is handled correctly. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/lib/WineTestBot/Jobs.pm | 4 ++-- testbot/lib/WineTestBot/Patches.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testbot/lib/WineTestBot/Jobs.pm b/testbot/lib/WineTestBot/Jobs.pm index edfe916..2dfadb0 100644 --- a/testbot/lib/WineTestBot/Jobs.pm +++ b/testbot/lib/WineTestBot/Jobs.pm @@ -426,13 +426,13 @@ my @PropertyDescriptors = ( CreateBasicPropertyDescriptor("Id", "Job id", 1, 1, "S", 5), CreateBasicPropertyDescriptor("Archived", "Job is archived", !1, 1, "B", 1), CreateItemrefPropertyDescriptor("Branch", "Branch", !1, 1, \&CreateBranches, ["BranchName"]), - CreateItemrefPropertyDescriptor("User", "Author", !1, 1, \&WineTestBot::Users::CreateUsers, ["UserName"]), + CreateItemrefPropertyDescriptor("User", "Author", !1, 1, \&CreateUsers, ["UserName"]), CreateBasicPropertyDescriptor("Priority", "Priority", !1, 1, "N", 1), CreateEnumPropertyDescriptor("Status", "Status", !1, 1, ['queued', 'running', 'completed', 'badpatch', 'badbuild', 'boterror', 'canceled']), CreateBasicPropertyDescriptor("Remarks", "Remarks", !1, !1, "A", 128), CreateBasicPropertyDescriptor("Submitted", "Submitted", !1, !1, "DT", 19), CreateBasicPropertyDescriptor("Ended", "Ended", !1, !1, "DT", 19), - CreateItemrefPropertyDescriptor("Patch", "Submitted from patch", !1, !1, \&WineTestBot::Patches::CreatePatches, ["PatchId"]), + CreateItemrefPropertyDescriptor("Patch", "Submitted from patch", !1, !1, \&CreatePatches, ["PatchId"]), CreateDetailrefPropertyDescriptor("Steps", "Steps", !1, !1, \&CreateSteps), ); SetDetailrefKeyPrefix("Job", @PropertyDescriptors); diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm index 5431d9f..955e336 100644 --- a/testbot/lib/WineTestBot/Patches.pm +++ b/testbot/lib/WineTestBot/Patches.pm @@ -244,7 +244,7 @@ sub Submit($$$) my $First = 1; foreach my $Module (keys %Modules) { - my $Jobs = WineTestBot::Jobs::CreateJobs(); + my $Jobs = CreateJobs(); # Create a new job for this patch my $NewJob = $Jobs->Add(); @@ -343,7 +343,7 @@ sub Submit($$$) } $self->Disposition($Disposition); - WineTestBot::Jobs::ScheduleJobs(); + ScheduleJobs(); return undef; }
1
0
0
0
Francois Gouget : testbot: Fix the main WineTestBot modules circular dependencies.
by Alexandre Julliard
26 Apr '18
26 Apr '18
Module: tools Branch: master Commit: 118132e71d6fd8b8c536ecd6d0b625d91ca446ac URL:
https://source.winehq.org/git/tools.git/?a=commit;h=118132e71d6fd8b8c536ecd…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Apr 26 09:45:33 2018 +0200 testbot: Fix the main WineTestBot modules circular dependencies. The main WineTestBot modules, those that implement access to the database, are prone to having circular dependencies. This is for instance the case between Jobs and Patches. Failure to handle these can force the use of fully qualified function names in hard to predict cases. So to avoid these issues, systematically declare the exports in a BEGIN block so they happen early enough. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/lib/WineTestBot/Branches.pm | 7 +++++-- testbot/lib/WineTestBot/Jobs.pm | 7 +++++-- testbot/lib/WineTestBot/Patches.pm | 7 +++++-- testbot/lib/WineTestBot/PendingPatchSets.pm | 7 +++++-- testbot/lib/WineTestBot/PendingPatches.pm | 7 +++++-- testbot/lib/WineTestBot/RecordGroups.pm | 7 +++++-- testbot/lib/WineTestBot/Records.pm | 7 +++++-- testbot/lib/WineTestBot/Roles.pm | 7 +++++-- testbot/lib/WineTestBot/Steps.pm | 7 +++++-- testbot/lib/WineTestBot/StepsTasks.pm | 7 +++++-- testbot/lib/WineTestBot/Tasks.pm | 7 +++++-- testbot/lib/WineTestBot/UserRoles.pm | 7 +++++-- testbot/lib/WineTestBot/Users.pm | 7 +++++-- testbot/lib/WineTestBot/VMs.pm | 7 +++++-- 14 files changed, 70 insertions(+), 28 deletions(-) diff --git a/testbot/lib/WineTestBot/Branches.pm b/testbot/lib/WineTestBot/Branches.pm index a18fafc..96cf26e 100644 --- a/testbot/lib/WineTestBot/Branches.pm +++ b/testbot/lib/WineTestBot/Branches.pm @@ -51,8 +51,11 @@ WineTestBot::Branches - A collection of WineTestBot::Branch objects use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreateBranches); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreateBranches); +} use ObjectModel::BasicPropertyDescriptor; diff --git a/testbot/lib/WineTestBot/Jobs.pm b/testbot/lib/WineTestBot/Jobs.pm index 0f80193..edfe916 100644 --- a/testbot/lib/WineTestBot/Jobs.pm +++ b/testbot/lib/WineTestBot/Jobs.pm @@ -396,8 +396,11 @@ those that are yet to be run. use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreateJobs ScheduleJobs CheckJobs); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreateJobs ScheduleJobs CheckJobs); +} use ObjectModel::BasicPropertyDescriptor; use ObjectModel::EnumPropertyDescriptor; diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm index e4b9b00..5431d9f 100644 --- a/testbot/lib/WineTestBot/Patches.pm +++ b/testbot/lib/WineTestBot/Patches.pm @@ -366,8 +366,11 @@ WineTestBot::Patches - A collection of WineTestBot::Patch objects use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreatePatches); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreatePatches); +} use ObjectModel::BasicPropertyDescriptor; use WineTestBot::Config; diff --git a/testbot/lib/WineTestBot/PendingPatchSets.pm b/testbot/lib/WineTestBot/PendingPatchSets.pm index 88dc736..26a5642 100644 --- a/testbot/lib/WineTestBot/PendingPatchSets.pm +++ b/testbot/lib/WineTestBot/PendingPatchSets.pm @@ -153,8 +153,11 @@ WineTestBot::PendingPatchSets - A collection of WineTestBot::PendingPatchSet obj use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreatePendingPatchSets); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreatePendingPatchSets); +} use ObjectModel::BasicPropertyDescriptor; use ObjectModel::DetailrefPropertyDescriptor; diff --git a/testbot/lib/WineTestBot/PendingPatches.pm b/testbot/lib/WineTestBot/PendingPatches.pm index 4de599d..414ebd0 100644 --- a/testbot/lib/WineTestBot/PendingPatches.pm +++ b/testbot/lib/WineTestBot/PendingPatches.pm @@ -45,8 +45,11 @@ WineTestBot::PendingPatches - A collection of WineTestBot::PendingPatch objects use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreatePendingPatches); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreatePendingPatches); +} use ObjectModel::BasicPropertyDescriptor; use ObjectModel::ItemrefPropertyDescriptor; diff --git a/testbot/lib/WineTestBot/RecordGroups.pm b/testbot/lib/WineTestBot/RecordGroups.pm index 9f0f520..27cedfe 100644 --- a/testbot/lib/WineTestBot/RecordGroups.pm +++ b/testbot/lib/WineTestBot/RecordGroups.pm @@ -54,8 +54,11 @@ WineTestBot::RecordGroups - A collection of WineTestBot::RecordGroup objects use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreateRecordGroups CompareRecordGroups SaveRecord); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreateRecordGroups CompareRecordGroups SaveRecord); +} use ObjectModel::BasicPropertyDescriptor; use ObjectModel::DetailrefPropertyDescriptor; diff --git a/testbot/lib/WineTestBot/Records.pm b/testbot/lib/WineTestBot/Records.pm index 990ae42..a3302af 100644 --- a/testbot/lib/WineTestBot/Records.pm +++ b/testbot/lib/WineTestBot/Records.pm @@ -62,8 +62,11 @@ WineTestBot::Records - A collection of WineTestBot::Record objects use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreateRecords); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreateRecords); +} use ObjectModel::BasicPropertyDescriptor; use ObjectModel::EnumPropertyDescriptor; diff --git a/testbot/lib/WineTestBot/Roles.pm b/testbot/lib/WineTestBot/Roles.pm index 45f370f..c37de63 100644 --- a/testbot/lib/WineTestBot/Roles.pm +++ b/testbot/lib/WineTestBot/Roles.pm @@ -43,8 +43,11 @@ WineTestBot::Roles - A collection of WineTestBot::Role objects use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreateRoles); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreateRoles); +} use ObjectModel::BasicPropertyDescriptor; diff --git a/testbot/lib/WineTestBot/Steps.pm b/testbot/lib/WineTestBot/Steps.pm index 2373473..635092d 100644 --- a/testbot/lib/WineTestBot/Steps.pm +++ b/testbot/lib/WineTestBot/Steps.pm @@ -184,8 +184,11 @@ WineTestBot::Steps - A collection of Job Steps use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreateSteps); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreateSteps); +} use ObjectModel::BasicPropertyDescriptor; use ObjectModel::EnumPropertyDescriptor; diff --git a/testbot/lib/WineTestBot/StepsTasks.pm b/testbot/lib/WineTestBot/StepsTasks.pm index 9dec806..232efe5 100644 --- a/testbot/lib/WineTestBot/StepsTasks.pm +++ b/testbot/lib/WineTestBot/StepsTasks.pm @@ -98,8 +98,11 @@ a specific database table. use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreateStepsTasks); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreateStepsTasks); +} use ObjectModel::BasicPropertyDescriptor; use ObjectModel::ItemrefPropertyDescriptor; diff --git a/testbot/lib/WineTestBot/Tasks.pm b/testbot/lib/WineTestBot/Tasks.pm index 4473df2..0cb2e7b 100644 --- a/testbot/lib/WineTestBot/Tasks.pm +++ b/testbot/lib/WineTestBot/Tasks.pm @@ -202,8 +202,11 @@ WineTestBot::Tasks - A collection of WineTestBot::Task objects use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreateTasks); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreateTasks); +} use ObjectModel::BasicPropertyDescriptor; use ObjectModel::EnumPropertyDescriptor; diff --git a/testbot/lib/WineTestBot/UserRoles.pm b/testbot/lib/WineTestBot/UserRoles.pm index 585537a..e01cd9d 100644 --- a/testbot/lib/WineTestBot/UserRoles.pm +++ b/testbot/lib/WineTestBot/UserRoles.pm @@ -39,8 +39,11 @@ WineTestBot::UserRoles - A collection of WineTestBot::UserRole objects use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreateUserRoles); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreateUserRoles); +} use ObjectModel::BasicPropertyDescriptor; use ObjectModel::ItemrefPropertyDescriptor; diff --git a/testbot/lib/WineTestBot/Users.pm b/testbot/lib/WineTestBot/Users.pm index 4752006..f7ebd93 100644 --- a/testbot/lib/WineTestBot/Users.pm +++ b/testbot/lib/WineTestBot/Users.pm @@ -296,8 +296,11 @@ WineTestBot::Users - A collection of WineTestBot::User objects use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreateUsers GetBatchUser Authenticate); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreateUsers GetBatchUser Authenticate); +} use Net::LDAP; use ObjectModel::BasicPropertyDescriptor; diff --git a/testbot/lib/WineTestBot/VMs.pm b/testbot/lib/WineTestBot/VMs.pm index b6305e8..c3a4a30 100644 --- a/testbot/lib/WineTestBot/VMs.pm +++ b/testbot/lib/WineTestBot/VMs.pm @@ -637,8 +637,11 @@ role or status. use Exporter 'import'; use WineTestBot::WineTestBotObjects; -our @ISA = qw(WineTestBot::WineTestBotCollection); -our @EXPORT = qw(CreateVMs); +BEGIN +{ + our @ISA = qw(WineTestBot::WineTestBotCollection); + our @EXPORT = qw(CreateVMs); +} use ObjectModel::BasicPropertyDescriptor; use ObjectModel::EnumPropertyDescriptor;
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
55
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
53
54
55
Results per page:
10
25
50
100
200