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
53819adf
Commit
53819adf
authored
Nov 14, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport [17449]: fix IPv6 quoting problems and remove dead code
parent
92d975a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
19 deletions
+14
-19
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+14
-19
No files found.
modules/services_discovery/sap.c
View file @
53819adf
...
...
@@ -258,13 +258,10 @@ struct demux_sys_t
static
sap_announce_t
*
CreateAnnounce
(
services_discovery_t
*
,
uint16_t
,
sdp_t
*
);
static
int
RemoveAnnounce
(
services_discovery_t
*
p_sd
,
sap_announce_t
*
p_announce
);
/* Cache */
static
void
CacheLoad
(
services_discovery_t
*
p_sd
);
static
void
CacheSave
(
services_discovery_t
*
p_sd
);
/* Helper functions */
static
char
*
GetAttribute
(
sdp_t
*
p_sdp
,
const
char
*
psz_search
);
static
vlc_bool_t
IsSameSession
(
sdp_t
*
p_sdp1
,
sdp_t
*
p_sdp2
);
static
int
InitSocket
(
services_discovery_t
*
p_sd
,
char
*
psz_address
,
int
i_port
);
static
int
InitSocket
(
services_discovery_t
*
p_sd
,
c
onst
c
har
*
psz_address
,
int
i_port
);
#ifdef HAVE_ZLIB_H
static
int
Decompress
(
unsigned
char
*
psz_src
,
unsigned
char
**
_dst
,
int
i_len
);
#endif
...
...
@@ -916,7 +913,6 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
char
*
psz_parse
=
NULL
;
char
*
psz_uri
=
NULL
;
char
*
psz_proto
=
NULL
;
char
psz_source
[
256
];
int
i_port
=
0
;
/* Parse c= field */
...
...
@@ -1070,9 +1066,19 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
/* handle SSM case */
psz_parse
=
GetAttribute
(
p_sdp
,
"source-filter"
);
psz_source
[
0
]
=
'\0'
;
char
psz_source
[
258
]
=
""
;
if
(
psz_parse
!=
NULL
)
{
char
psz_source_ip
[
256
];
if
(
psz_parse
)
sscanf
(
psz_parse
,
" incl IN IP%*s %*s %255s "
,
psz_source
);
if
(
sscanf
(
psz_parse
,
" incl IN IP%*c %*s %255s "
,
psz_source_ip
)
==
1
)
{
if
(
strchr
(
psz_source_ip
,
':'
)
!=
NULL
)
sprintf
(
psz_source
,
"[%s]"
,
psz_source_ip
);
else
strcpy
(
psz_source
,
psz_source_ip
);
}
}
asprintf
(
&
p_sdp
->
psz_uri
,
"%s://%s@%s:%i"
,
psz_proto
,
psz_source
,
psz_uri
,
i_port
);
...
...
@@ -1272,7 +1278,7 @@ static sdp_t * ParseSDP( vlc_object_t *p_obj, char* psz_sdp )
return
p_sdp
;
}
static
int
InitSocket
(
services_discovery_t
*
p_sd
,
char
*
psz_address
,
static
int
InitSocket
(
services_discovery_t
*
p_sd
,
c
onst
c
har
*
psz_address
,
int
i_port
)
{
int
i_fd
=
net_OpenUDP
(
p_sd
,
psz_address
,
i_port
,
NULL
,
0
);
...
...
@@ -1431,14 +1437,3 @@ static vlc_bool_t IsSameSession( sdp_t *p_sdp1, sdp_t *p_sdp2 )
return
VLC_FALSE
;
}
}
static
void
CacheLoad
(
services_discovery_t
*
p_sd
)
{
msg_Warn
(
p_sd
,
"cache not implemented"
)
;
}
static
void
CacheSave
(
services_discovery_t
*
p_sd
)
{
msg_Warn
(
p_sd
,
"cache not implemented"
)
;
}
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