Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
5cd565b2
Commit
5cd565b2
authored
Jul 28, 2005
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- replaced inet_pton() with WSAStringToAddress() for WIN32
needs review, not tested but it compiles
parent
66c22fa0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
src/stream_output/sap.c
src/stream_output/sap.c
+21
-0
No files found.
src/stream_output/sap.c
View file @
5cd565b2
...
...
@@ -457,8 +457,29 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
psz_head
[
2
]
=
(
i_hash
&
0xFF00
)
>>
8
;
/* Msg id hash */
psz_head
[
3
]
=
(
i_hash
&
0xFF
);
/* Msg id hash 2 */
#if defined(WIN32)
if
(
b_ipv6
)
{
struct
sockaddr_in6
saddr
;
int
len
=
sizeof
(
saddr
);
if
(
!
WSAStringToAddress
(
p_sap_session
->
p_address
->
psz_machine
,
AF_INET6
,
NULL
,
(
LPSOCKADDR
)
&
saddr
,
&
len
)
)
return
VLC_ENOMEM
;
memcpy
(
psz_head
+
4
,
&
saddr
.
sin6_addr
,
sizeof
(
struct
in6_addr
));
}
else
{
struct
sockaddr_in
saddr
;
int
len
=
sizeof
(
saddr
);
if
(
!
WSAStringToAddress
(
p_sap_session
->
p_address
->
psz_machine
,
AF_INET
,
NULL
,
(
LPSOCKADDR
)
&
saddr
,
&
len
)
)
return
VLC_ENOMEM
;
memcpy
(
psz_head
+
4
,
&
saddr
.
sin_addr
,
sizeof
(
struct
in_addr
));
}
#else
inet_pton
(
b_ipv6
?
AF_INET6
:
AF_INET
,
/* can't fail */
p_sap_session
->
p_address
->
psz_machine
,
psz_head
+
4
);
#endif
memcpy
(
psz_head
+
(
b_ipv6
?
20
:
8
),
"application/sdp"
,
15
);
...
...
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