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
0d564359
Commit
0d564359
authored
Aug 26, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http.sys: Fill out the local and remote addresses.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d39dc980
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
http.c
dlls/http.sys/http.c
+29
-0
No files found.
dlls/http.sys/http.c
View file @
0d564359
...
@@ -274,6 +274,8 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp)
...
@@ -274,6 +274,8 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp)
const
DWORD
output_len
=
stack
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
;
const
DWORD
output_len
=
stack
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
;
ULONG
cooked_len
,
host_len
,
abs_path_len
,
query_len
,
offset
;
ULONG
cooked_len
,
host_len
,
abs_path_len
,
query_len
,
offset
;
const
char
*
p
,
*
host
,
*
abs_path
,
*
query
;
const
char
*
p
,
*
host
,
*
abs_path
,
*
query
;
struct
sockaddr_in
addr
;
int
len
;
TRACE
(
"Completing IRP %p.
\n
"
,
irp
);
TRACE
(
"Completing IRP %p.
\n
"
,
irp
);
...
@@ -309,6 +311,9 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp)
...
@@ -309,6 +311,9 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp)
cooked_len
=
(
7
/* scheme */
+
host_len
+
abs_path_len
+
query_len
)
*
sizeof
(
WCHAR
);
cooked_len
=
(
7
/* scheme */
+
host_len
+
abs_path_len
+
query_len
)
*
sizeof
(
WCHAR
);
irp_size
+=
cooked_len
+
sizeof
(
WCHAR
);
irp_size
+=
cooked_len
+
sizeof
(
WCHAR
);
/* addresses */
irp_size
+=
2
*
sizeof
(
addr
);
TRACE
(
"Need %u bytes, have %u.
\n
"
,
irp_size
,
output_len
);
TRACE
(
"Need %u bytes, have %u.
\n
"
,
irp_size
,
output_len
);
irp
->
IoStatus
.
Information
=
irp_size
;
irp
->
IoStatus
.
Information
=
irp_size
;
...
@@ -376,6 +381,18 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp)
...
@@ -376,6 +381,18 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp)
buffer
[
offset
++
]
=
0
;
buffer
[
offset
++
]
=
0
;
buffer
[
offset
++
]
=
0
;
buffer
[
offset
++
]
=
0
;
req
->
Address
.
pRemoteAddress
=
params
.
addr
+
offset
;
len
=
sizeof
(
addr
);
getpeername
(
conn
->
socket
,
(
struct
sockaddr
*
)
&
addr
,
&
len
);
memcpy
(
buffer
+
offset
,
&
addr
,
sizeof
(
addr
));
offset
+=
sizeof
(
addr
);
req
->
Address
.
pLocalAddress
=
params
.
addr
+
offset
;
len
=
sizeof
(
addr
);
getsockname
(
conn
->
socket
,
(
struct
sockaddr
*
)
&
addr
,
&
len
);
memcpy
(
buffer
+
offset
,
&
addr
,
sizeof
(
addr
));
offset
+=
sizeof
(
addr
);
req
->
BytesReceived
=
conn
->
req_len
;
req
->
BytesReceived
=
conn
->
req_len
;
}
}
else
else
...
@@ -425,6 +442,18 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp)
...
@@ -425,6 +442,18 @@ static NTSTATUS complete_irp(struct connection *conn, IRP *irp)
buffer
[
offset
++
]
=
0
;
buffer
[
offset
++
]
=
0
;
buffer
[
offset
++
]
=
0
;
buffer
[
offset
++
]
=
0
;
req
->
Address
.
pRemoteAddress
=
params
.
addr
+
offset
;
len
=
sizeof
(
addr
);
getpeername
(
conn
->
socket
,
(
struct
sockaddr
*
)
&
addr
,
&
len
);
memcpy
(
buffer
+
offset
,
&
addr
,
sizeof
(
addr
));
offset
+=
sizeof
(
addr
);
req
->
Address
.
pLocalAddress
=
params
.
addr
+
offset
;
len
=
sizeof
(
addr
);
getsockname
(
conn
->
socket
,
(
struct
sockaddr
*
)
&
addr
,
&
len
);
memcpy
(
buffer
+
offset
,
&
addr
,
sizeof
(
addr
));
offset
+=
sizeof
(
addr
);
req
->
BytesReceived
=
conn
->
req_len
;
req
->
BytesReceived
=
conn
->
req_len
;
}
}
...
...
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