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
c3749364
Commit
c3749364
authored
Feb 10, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Depend on Read result in report_data.
parent
f66b99db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
binding.c
dlls/urlmon/binding.c
+11
-11
No files found.
dlls/urlmon/binding.c
View file @
c3749364
...
...
@@ -55,6 +55,7 @@ typedef struct {
BYTE
buf
[
1024
*
8
];
DWORD
buf_size
;
BOOL
init_buf
;
HRESULT
hres
;
}
ProtocolStream
;
typedef
enum
{
...
...
@@ -139,14 +140,13 @@ static task_header_t *pop_task(Binding *binding)
static
void
fill_stream_buffer
(
ProtocolStream
*
This
)
{
DWORD
read
=
0
;
HRESULT
hres
;
if
(
sizeof
(
This
->
buf
)
==
This
->
buf_size
)
return
;
hres
=
IInternetProtocol_Read
(
This
->
protocol
,
This
->
buf
+
This
->
buf_size
,
sizeof
(
This
->
buf
)
-
This
->
buf_size
,
&
read
);
if
(
SUCCEEDED
(
hres
))
{
This
->
hres
=
IInternetProtocol_Read
(
This
->
protocol
,
This
->
buf
+
This
->
buf_size
,
sizeof
(
This
->
buf
)
-
This
->
buf_size
,
&
read
);
if
(
SUCCEEDED
(
This
->
hres
))
{
This
->
buf_size
+=
read
;
This
->
init_buf
=
TRUE
;
}
...
...
@@ -389,7 +389,6 @@ static HRESULT WINAPI ProtocolStream_Read(IStream *iface, void *pv,
{
ProtocolStream
*
This
=
STREAM_THIS
(
iface
);
DWORD
read
=
0
,
pread
=
0
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p %d %p)
\n
"
,
This
,
pv
,
cb
,
pcbRead
);
...
...
@@ -411,13 +410,13 @@ static HRESULT WINAPI ProtocolStream_Read(IStream *iface, void *pv,
return
S_OK
;
}
hres
=
IInternetProtocol_Read
(
This
->
protocol
,
(
PBYTE
)
pv
+
read
,
cb
-
read
,
&
pread
);
This
->
hres
=
IInternetProtocol_Read
(
This
->
protocol
,
(
PBYTE
)
pv
+
read
,
cb
-
read
,
&
pread
);
*
pcbRead
=
read
+
pread
;
if
(
hres
==
E_PENDING
)
if
(
This
->
hres
==
E_PENDING
)
return
E_PENDING
;
else
if
(
FAILED
(
hres
))
FIXME
(
"Read failed: %08x
\n
"
,
hres
);
else
if
(
FAILED
(
This
->
hres
))
FIXME
(
"Read failed: %08x
\n
"
,
This
->
hres
);
return
read
||
pread
?
S_OK
:
S_FALSE
;
}
...
...
@@ -533,6 +532,7 @@ static ProtocolStream *create_stream(IInternetProtocol *protocol)
ret
->
ref
=
1
;
ret
->
buf_size
=
0
;
ret
->
init_buf
=
FALSE
;
ret
->
hres
=
S_OK
;
IInternetProtocol_AddRef
(
protocol
);
ret
->
protocol
=
protocol
;
...
...
@@ -859,7 +859,7 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres
BINDSTATUS_BEGINDOWNLOADDATA
,
This
->
url
);
}
if
(
bscf
&
BSCF_LASTDATANOTIFICATION
)
{
if
(
This
->
stream
->
hres
==
S_FALSE
||
(
bscf
&
BSCF_LASTDATANOTIFICATION
)
)
{
IBindStatusCallback_OnProgress
(
This
->
callback
,
progress
,
progress_max
,
BINDSTATUS_ENDDOWNLOADDATA
,
This
->
url
);
}
...
...
@@ -874,7 +874,7 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres
IBindStatusCallback_OnDataAvailable
(
This
->
callback
,
bscf
,
This
->
stream
->
buf_size
,
&
formatetc
,
&
This
->
stgmed
);
if
(
bscf
&
BSCF_LASTDATANOTIFICATION
)
{
if
(
This
->
stream
->
hres
==
S_FALSE
)
{
This
->
download_state
=
END_DOWNLOAD
;
IBindStatusCallback_OnStopBinding
(
This
->
callback
,
S_OK
,
NULL
);
}
...
...
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