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
5b8e4c0b
Commit
5b8e4c0b
authored
Feb 11, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix link-scoped IPv6 addresses
parent
6bf818a2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
src/stream_output/sdp.c
src/stream_output/sdp.c
+10
-9
No files found.
src/stream_output/sdp.c
View file @
5b8e4c0b
...
@@ -38,36 +38,37 @@ char *AddressToSDP (const struct sockaddr *addr, socklen_t addrlen, char *buf)
...
@@ -38,36 +38,37 @@ char *AddressToSDP (const struct sockaddr *addr, socklen_t addrlen, char *buf)
+
sizeof
(
addr
->
sa_family
))
+
sizeof
(
addr
->
sa_family
))
return
NULL
;
return
NULL
;
const
char
*
ttl
=
NULL
;
strcpy
(
buf
,
"IN IP* "
);
strcpy
(
buf
,
"IN IP* "
);
if
(
vlc_getnameinfo
(
addr
,
addrlen
,
buf
+
7
,
MAXSDPADDRESS
-
7
,
NULL
,
NI_NUMERICHOST
))
return
NULL
;
switch
(
addr
->
sa_family
)
switch
(
addr
->
sa_family
)
{
{
case
AF_INET
:
case
AF_INET
:
{
{
if
(
net_SockAddrIsMulticast
(
addr
,
addrlen
))
if
(
net_SockAddrIsMulticast
(
addr
,
addrlen
))
ttl
=
"/255"
;
// obsolete in RFC4566, dummy value
strcat
(
buf
,
"/255"
)
;
// obsolete in RFC4566, dummy value
buf
[
5
]
=
'4'
;
buf
[
5
]
=
'4'
;
break
;
break
;
}
}
#ifdef AF_INET6
#ifdef AF_INET6
case
AF_INET6
:
case
AF_INET6
:
{
char
*
ptr
=
strchr
(
buf
,
'%'
);
if
(
ptr
!=
NULL
)
*
ptr
=
'\0'
;
// remove scope ID
buf
[
5
]
=
'6'
;
buf
[
5
]
=
'6'
;
break
;
break
;
}
#endif
#endif
default:
default:
return
NULL
;
return
NULL
;
}
}
if
(
vlc_getnameinfo
(
addr
,
addrlen
,
buf
+
7
,
MAXSDPADDRESS
-
7
,
NULL
,
NI_NUMERICHOST
))
return
NULL
;
if
(
ttl
!=
NULL
)
strcat
(
buf
,
ttl
);
return
buf
;
return
buf
;
}
}
...
...
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