Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
e5cadc53
Commit
e5cadc53
authored
Jun 20, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sap: remove useless source socket address
parent
c037e794
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
src/stream_output/sap.c
src/stream_output/sap.c
+7
-12
No files found.
src/stream_output/sap.c
View file @
e5cadc53
...
...
@@ -44,8 +44,6 @@
struct
session_descriptor_t
{
struct
sockaddr_storage
orig
;
socklen_t
origlen
;
struct
sockaddr_storage
addr
;
socklen_t
addrlen
;
...
...
@@ -328,11 +326,8 @@ static int SAP_Add (sap_handler_t *p_sap, session_descriptor_t *p_session,
vlc_mutex_lock
(
&
sap_addr
->
lock
);
vlc_mutex_unlock
(
&
p_sap
->
lock
);
memcpy
(
&
p_session
->
orig
,
&
sap_addr
->
orig
,
sap_addr
->
origlen
);
p_session
->
origlen
=
sap_addr
->
origlen
;
size_t
headsize
=
20
,
length
;
switch
(
p_session
->
orig
.
ss_family
)
switch
(
sap_addr
->
orig
.
ss_family
)
{
#ifdef AF_INET6
case
AF_INET6
:
...
...
@@ -371,13 +366,13 @@ static int SAP_Add (sap_handler_t *p_sap, session_descriptor_t *p_session,
psz_head
[
3
]
=
i_hash
;
/* Msg id hash 2 */
headsize
=
4
;
switch
(
p_session
->
orig
.
ss_family
)
switch
(
sap_addr
->
orig
.
ss_family
)
{
#ifdef AF_INET6
case
AF_INET6
:
{
struct
in6_addr
*
a6
=
&
((
struct
sockaddr_in6
*
)
&
p_session
->
orig
)
->
sin6_addr
;
const
struct
in6_addr
*
a6
=
&
((
const
struct
sockaddr_in6
*
)
&
sap_addr
->
orig
)
->
sin6_addr
;
memcpy
(
psz_head
+
headsize
,
a6
,
16
);
psz_head
[
0
]
|=
0x10
;
/* IPv6 flag */
headsize
+=
16
;
...
...
@@ -386,9 +381,9 @@ static int SAP_Add (sap_handler_t *p_sap, session_descriptor_t *p_session,
#endif
case
AF_INET
:
{
uint32_t
ipv
4
=
(((
struct
sockaddr_in
*
)
&
p_session
->
orig
)
->
sin_addr
.
s_addr
)
;
memcpy
(
psz_head
+
headsize
,
&
ipv
4
,
4
);
const
struct
in_addr
*
a
4
=
&
((
const
struct
sockaddr_in
*
)
&
sap_addr
->
orig
)
->
sin_addr
;
memcpy
(
psz_head
+
headsize
,
a
4
,
4
);
headsize
+=
4
;
break
;
}
...
...
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