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
08685417
Commit
08685417
authored
May 31, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 01, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Use task queue in Switch implementation.
parent
99cb9539
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
binding.c
dlls/urlmon/binding.c
+22
-19
No files found.
dlls/urlmon/binding.c
View file @
08685417
...
...
@@ -37,7 +37,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef
struct
Binding
Binding
;
enum
task_enum
{
TASK_ON_PROGRESS
TASK_ON_PROGRESS
,
TASK_SWITCH
};
typedef
struct
{
...
...
@@ -48,17 +49,13 @@ typedef struct {
LPWSTR
status_text
;
}
on_progress_data
;
typedef
struct
{
Binding
*
binding
;
PROTOCOLDATA
*
data
;
}
switch_data
;
typedef
struct
_task_t
{
enum
task_enum
task
;
Binding
*
binding
;
struct
_task_t
*
next
;
union
{
on_progress_data
on_progress
;
PROTOCOLDATA
*
protocol_data
;
}
data
;
}
task_t
;
...
...
@@ -156,7 +153,13 @@ static void do_task(task_t *task)
HeapFree
(
GetProcessHeap
(),
0
,
data
->
status_text
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
break
;
}
case
TASK_SWITCH
:
task
->
binding
->
continue_call
++
;
IInternetProtocol_Continue
(
task
->
binding
->
protocol
,
task
->
data
.
protocol_data
);
task
->
binding
->
continue_call
--
;
}
}
...
...
@@ -188,16 +191,11 @@ static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return
0
;
}
case
WM_MK_CONTINUE
:
{
switch_data
*
data
=
(
switch_data
*
)
lParam
;
data
->
binding
->
continue_call
++
;
IInternetProtocol_Continue
(
data
->
binding
->
protocol
,
data
->
data
);
data
->
binding
->
continue_call
--
;
Binding
*
binding
=
(
Binding
*
)
lParam
;
do_tasks
(
data
->
binding
);
do_tasks
(
binding
);
IBinding_Release
(
BINDING
(
data
->
binding
));
HeapFree
(
GetProcessHeap
(),
0
,
data
);
IBinding_Release
(
BINDING
(
binding
));
return
0
;
}
}
...
...
@@ -806,17 +804,22 @@ static HRESULT WINAPI InternetProtocolSink_Switch(IInternetProtocolSink *iface,
PROTOCOLDATA
*
pProtocolData
)
{
Binding
*
This
=
PROTSINK_THIS
(
iface
);
switch_data
*
data
;
task_t
*
task
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pProtocolData
);
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
switch_data
));
task
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
task_t
));
task
->
task
=
TASK_SWITCH
;
IBinding_AddRef
(
BINDING
(
This
));
data
->
binding
=
This
;
data
->
data
=
pProtocolData
;
task
->
binding
=
This
;
PostMessageW
(
This
->
notif_hwnd
,
WM_MK_CONTINUE
,
0
,
(
LPARAM
)
data
);
task
->
data
.
protocol_data
=
pProtocolData
;
push_task
(
task
);
IBinding_AddRef
(
BINDING
(
This
));
PostMessageW
(
This
->
notif_hwnd
,
WM_MK_CONTINUE
,
0
,
(
LPARAM
)
This
);
return
S_OK
;
}
...
...
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