Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
13c3f7ac
Commit
13c3f7ac
authored
Jun 12, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: Implement IBackgroundCopyJob::Cancel.
parent
63aa9457
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
2 deletions
+50
-2
file.c
dlls/qmgr/file.c
+1
-0
job.c
dlls/qmgr/job.c
+49
-2
No files found.
dlls/qmgr/file.c
View file @
13c3f7ac
...
...
@@ -201,6 +201,7 @@ HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner,
This
->
fileProgress
.
Completed
=
FALSE
;
This
->
owner
=
owner
;
This
->
read_size
=
0
;
This
->
tempFileName
[
0
]
=
0
;
IBackgroundCopyJob3_AddRef
(
&
owner
->
IBackgroundCopyJob3_iface
);
*
file
=
This
;
...
...
dlls/qmgr/job.c
View file @
13c3f7ac
...
...
@@ -259,6 +259,9 @@ static ULONG WINAPI BackgroundCopyJob_Release(IBackgroundCopyJob3 *iface)
HeapFree
(
GetProcessHeap
(),
0
,
cred
->
Credentials
.
Basic
.
Password
);
}
}
CloseHandle
(
This
->
wait
);
CloseHandle
(
This
->
cancel
);
CloseHandle
(
This
->
done
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
@@ -365,8 +368,48 @@ static HRESULT WINAPI BackgroundCopyJob_Cancel(
IBackgroundCopyJob3
*
iface
)
{
BackgroundCopyJobImpl
*
This
=
impl_from_IBackgroundCopyJob3
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
E_NOTIMPL
;
HRESULT
rv
=
S_OK
;
TRACE
(
"(%p)
\n
"
,
This
);
EnterCriticalSection
(
&
This
->
cs
);
if
(
is_job_done
(
This
))
{
rv
=
BG_E_INVALID_STATE
;
}
else
{
BackgroundCopyFileImpl
*
file
;
if
(
This
->
state
==
BG_JOB_STATE_CONNECTING
||
This
->
state
==
BG_JOB_STATE_TRANSFERRING
)
{
This
->
state
=
BG_JOB_STATE_CANCELLED
;
SetEvent
(
This
->
cancel
);
LeaveCriticalSection
(
&
This
->
cs
);
WaitForSingleObject
(
This
->
done
,
INFINITE
);
EnterCriticalSection
(
&
This
->
cs
);
}
LIST_FOR_EACH_ENTRY
(
file
,
&
This
->
files
,
BackgroundCopyFileImpl
,
entryFromJob
)
{
if
(
file
->
tempFileName
[
0
]
&&
!
DeleteFileW
(
file
->
tempFileName
))
{
WARN
(
"Couldn't delete %s (%u)
\n
"
,
debugstr_w
(
file
->
tempFileName
),
GetLastError
());
rv
=
BG_S_UNABLE_TO_DELETE_FILES
;
}
if
(
file
->
info
.
LocalName
&&
!
DeleteFileW
(
file
->
info
.
LocalName
))
{
WARN
(
"Couldn't delete %s (%u)
\n
"
,
debugstr_w
(
file
->
info
.
LocalName
),
GetLastError
());
rv
=
BG_S_UNABLE_TO_DELETE_FILES
;
}
}
This
->
state
=
BG_JOB_STATE_CANCELLED
;
}
LeaveCriticalSection
(
&
This
->
cs
);
return
rv
;
}
static
HRESULT
WINAPI
BackgroundCopyJob_Complete
(
...
...
@@ -1193,6 +1236,10 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type, GUID
memset
(
&
This
->
http_options
,
0
,
sizeof
(
This
->
http_options
));
This
->
wait
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
This
->
cancel
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
This
->
done
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
*
job
=
This
;
TRACE
(
"created job %s:%p
\n
"
,
debugstr_guid
(
&
This
->
jobId
),
This
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment