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
4121ac12
Commit
4121ac12
authored
Jan 03, 2011
by
David Hedberg
Committed by
Alexandre Julliard
Jan 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Add new on_error function to protocol vtbl.
parent
2b5c18c3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
19 deletions
+47
-19
ftp.c
dlls/urlmon/ftp.c
+7
-1
gopher.c
dlls/urlmon/gopher.c
+7
-1
http.c
dlls/urlmon/http.c
+7
-1
protocol.c
dlls/urlmon/protocol.c
+24
-16
urlmon_main.h
dlls/urlmon/urlmon_main.h
+2
-0
No files found.
dlls/urlmon/ftp.c
View file @
4121ac12
...
@@ -99,13 +99,19 @@ static void FtpProtocol_close_connection(Protocol *prot)
...
@@ -99,13 +99,19 @@ static void FtpProtocol_close_connection(Protocol *prot)
{
{
}
}
static
void
FtpProtocol_on_error
(
Protocol
*
prot
,
DWORD
error
)
{
FIXME
(
"(%p) %d - stub
\n
"
,
prot
,
error
);
}
#undef ASYNCPROTOCOL_THIS
#undef ASYNCPROTOCOL_THIS
static
const
ProtocolVtbl
AsyncProtocolVtbl
=
{
static
const
ProtocolVtbl
AsyncProtocolVtbl
=
{
FtpProtocol_open_request
,
FtpProtocol_open_request
,
FtpProtocol_end_request
,
FtpProtocol_end_request
,
FtpProtocol_start_downloading
,
FtpProtocol_start_downloading
,
FtpProtocol_close_connection
FtpProtocol_close_connection
,
FtpProtocol_on_error
};
};
static
HRESULT
WINAPI
FtpProtocol_QueryInterface
(
IInternetProtocolEx
*
iface
,
REFIID
riid
,
void
**
ppv
)
static
HRESULT
WINAPI
FtpProtocol_QueryInterface
(
IInternetProtocolEx
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
dlls/urlmon/gopher.c
View file @
4121ac12
...
@@ -70,13 +70,19 @@ static void GopherProtocol_close_connection(Protocol *prot)
...
@@ -70,13 +70,19 @@ static void GopherProtocol_close_connection(Protocol *prot)
{
{
}
}
static
void
GopherProtocol_on_error
(
Protocol
*
prot
,
DWORD
error
)
{
FIXME
(
"(%p) %d - stub
\n
"
,
prot
,
error
);
}
#undef ASYNCPROTOCOL_THIS
#undef ASYNCPROTOCOL_THIS
static
const
ProtocolVtbl
AsyncProtocolVtbl
=
{
static
const
ProtocolVtbl
AsyncProtocolVtbl
=
{
GopherProtocol_open_request
,
GopherProtocol_open_request
,
GopherProtocol_end_request
,
GopherProtocol_end_request
,
GopherProtocol_start_downloading
,
GopherProtocol_start_downloading
,
GopherProtocol_close_connection
GopherProtocol_close_connection
,
GopherProtocol_on_error
};
};
#define PROTOCOL_THIS(iface) DEFINE_THIS(GopherProtocol, IInternetProtocol, iface)
#define PROTOCOL_THIS(iface) DEFINE_THIS(GopherProtocol, IInternetProtocol, iface)
...
...
dlls/urlmon/http.c
View file @
4121ac12
...
@@ -388,13 +388,19 @@ static void HttpProtocol_close_connection(Protocol *prot)
...
@@ -388,13 +388,19 @@ static void HttpProtocol_close_connection(Protocol *prot)
}
}
}
}
static
void
HttpProtocol_on_error
(
Protocol
*
prot
,
DWORD
error
)
{
FIXME
(
"(%p) %d - stub
\n
"
,
prot
,
error
);
}
#undef ASYNCPROTOCOL_THIS
#undef ASYNCPROTOCOL_THIS
static
const
ProtocolVtbl
AsyncProtocolVtbl
=
{
static
const
ProtocolVtbl
AsyncProtocolVtbl
=
{
HttpProtocol_open_request
,
HttpProtocol_open_request
,
HttpProtocol_end_request
,
HttpProtocol_end_request
,
HttpProtocol_start_downloading
,
HttpProtocol_start_downloading
,
HttpProtocol_close_connection
HttpProtocol_close_connection
,
HttpProtocol_on_error
};
};
static
HRESULT
WINAPI
HttpProtocol_QueryInterface
(
IInternetProtocolEx
*
iface
,
REFIID
riid
,
void
**
ppv
)
static
HRESULT
WINAPI
HttpProtocol_QueryInterface
(
IInternetProtocolEx
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
dlls/urlmon/protocol.c
View file @
4121ac12
...
@@ -76,25 +76,27 @@ static void request_complete(Protocol *protocol, INTERNET_ASYNC_RESULT *ar)
...
@@ -76,25 +76,27 @@ static void request_complete(Protocol *protocol, INTERNET_ASYNC_RESULT *ar)
TRACE
(
"(%p)->(%p)
\n
"
,
protocol
,
ar
);
TRACE
(
"(%p)->(%p)
\n
"
,
protocol
,
ar
);
if
(
!
ar
->
dwResult
)
{
WARN
(
"request failed: %d
\n
"
,
ar
->
dwError
);
return
;
}
protocol
->
flags
|=
FLAG_REQUEST_COMPLETE
;
if
(
!
protocol
->
request
)
{
TRACE
(
"setting request handle %p
\n
"
,
(
HINTERNET
)
ar
->
dwResult
);
protocol
->
request
=
(
HINTERNET
)
ar
->
dwResult
;
}
/* PROTOCOLDATA same as native */
/* PROTOCOLDATA same as native */
memset
(
&
data
,
0
,
sizeof
(
data
));
memset
(
&
data
,
0
,
sizeof
(
data
));
data
.
dwState
=
0xf1000000
;
data
.
dwState
=
0xf1000000
;
if
(
protocol
->
flags
&
FLAG_FIRST_CONTINUE_COMPLETE
)
data
.
pData
=
(
LPVOID
)
BINDSTATUS_ENDDOWNLOADCOMPONENTS
;
if
(
ar
->
dwResult
)
{
else
protocol
->
flags
|=
FLAG_REQUEST_COMPLETE
;
data
.
pData
=
(
LPVOID
)
BINDSTATUS_DOWNLOADINGDATA
;
if
(
!
protocol
->
request
)
{
TRACE
(
"setting request handle %p
\n
"
,
(
HINTERNET
)
ar
->
dwResult
);
protocol
->
request
=
(
HINTERNET
)
ar
->
dwResult
;
}
if
(
protocol
->
flags
&
FLAG_FIRST_CONTINUE_COMPLETE
)
data
.
pData
=
(
LPVOID
)
BINDSTATUS_ENDDOWNLOADCOMPONENTS
;
else
data
.
pData
=
(
LPVOID
)
BINDSTATUS_DOWNLOADINGDATA
;
}
else
{
protocol
->
flags
|=
FLAG_ERROR
;
data
.
pData
=
(
LPVOID
)
ar
->
dwError
;
}
if
(
protocol
->
bindf
&
BINDF_FROMURLMON
)
if
(
protocol
->
bindf
&
BINDF_FROMURLMON
)
IInternetProtocolSink_Switch
(
protocol
->
protocol_sink
,
&
data
);
IInternetProtocolSink_Switch
(
protocol
->
protocol_sink
,
&
data
);
...
@@ -301,6 +303,12 @@ HRESULT protocol_continue(Protocol *protocol, PROTOCOLDATA *data)
...
@@ -301,6 +303,12 @@ HRESULT protocol_continue(Protocol *protocol, PROTOCOLDATA *data)
return
S_OK
;
return
S_OK
;
}
}
if
(
protocol
->
flags
&
FLAG_ERROR
)
{
protocol
->
flags
&=
~
FLAG_ERROR
;
protocol
->
vtbl
->
on_error
(
protocol
,
(
DWORD
)
data
->
pData
);
return
S_OK
;
}
if
(
protocol
->
post_stream
)
if
(
protocol
->
post_stream
)
return
write_post_stream
(
protocol
);
return
write_post_stream
(
protocol
);
...
...
dlls/urlmon/urlmon_main.h
View file @
4121ac12
...
@@ -113,6 +113,7 @@ struct ProtocolVtbl {
...
@@ -113,6 +113,7 @@ struct ProtocolVtbl {
HRESULT
(
*
end_request
)(
Protocol
*
);
HRESULT
(
*
end_request
)(
Protocol
*
);
HRESULT
(
*
start_downloading
)(
Protocol
*
);
HRESULT
(
*
start_downloading
)(
Protocol
*
);
void
(
*
close_connection
)(
Protocol
*
);
void
(
*
close_connection
)(
Protocol
*
);
void
(
*
on_error
)(
Protocol
*
,
DWORD
);
};
};
/* Flags are needed for, among other things, return HRESULTs from the Read function
/* Flags are needed for, among other things, return HRESULTs from the Read function
...
@@ -144,6 +145,7 @@ struct ProtocolVtbl {
...
@@ -144,6 +145,7 @@ struct ProtocolVtbl {
#define FLAG_ALL_DATA_READ 0x0008
#define FLAG_ALL_DATA_READ 0x0008
#define FLAG_LAST_DATA_REPORTED 0x0010
#define FLAG_LAST_DATA_REPORTED 0x0010
#define FLAG_RESULT_REPORTED 0x0020
#define FLAG_RESULT_REPORTED 0x0020
#define FLAG_ERROR 0x0040
HRESULT
protocol_start
(
Protocol
*
,
IInternetProtocol
*
,
IUri
*
,
IInternetProtocolSink
*
,
IInternetBindInfo
*
);
HRESULT
protocol_start
(
Protocol
*
,
IInternetProtocol
*
,
IUri
*
,
IInternetProtocolSink
*
,
IInternetBindInfo
*
);
HRESULT
protocol_continue
(
Protocol
*
,
PROTOCOLDATA
*
);
HRESULT
protocol_continue
(
Protocol
*
,
PROTOCOLDATA
*
);
...
...
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