Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
4059d487
Commit
4059d487
authored
Nov 04, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix quoting of IPv6 addresses in SAP source-filter
- Fix const warnings - Remove dead code
parent
9e430e6b
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 @
4059d487
...
@@ -260,13 +260,10 @@ struct demux_sys_t
...
@@ -260,13 +260,10 @@ struct demux_sys_t
static
sap_announce_t
*
CreateAnnounce
(
services_discovery_t
*
,
uint16_t
,
sdp_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
);
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 */
/* Helper functions */
static
char
*
GetAttribute
(
sdp_t
*
p_sdp
,
const
char
*
psz_search
);
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
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
#ifdef HAVE_ZLIB_H
static
int
Decompress
(
unsigned
char
*
psz_src
,
unsigned
char
**
_dst
,
int
i_len
);
static
int
Decompress
(
unsigned
char
*
psz_src
,
unsigned
char
**
_dst
,
int
i_len
);
#endif
#endif
...
@@ -894,7 +891,6 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
...
@@ -894,7 +891,6 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
char
*
psz_parse
=
NULL
;
char
*
psz_parse
=
NULL
;
char
*
psz_uri
=
NULL
;
char
*
psz_uri
=
NULL
;
char
*
psz_proto
=
NULL
;
char
*
psz_proto
=
NULL
;
char
psz_source
[
256
];
int
i_port
=
0
;
int
i_port
=
0
;
/* Parse c= field */
/* Parse c= field */
...
@@ -1048,9 +1044,19 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
...
@@ -1048,9 +1044,19 @@ static int ParseConnection( vlc_object_t *p_obj, sdp_t *p_sdp )
/* handle SSM case */
/* handle SSM case */
psz_parse
=
GetAttribute
(
p_sdp
,
"source-filter"
);
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
,
asprintf
(
&
p_sdp
->
psz_uri
,
"%s://%s@%s:%i"
,
psz_proto
,
psz_source
,
psz_uri
,
i_port
);
psz_uri
,
i_port
);
...
@@ -1258,7 +1264,7 @@ static sdp_t * ParseSDP( vlc_object_t *p_obj, char* psz_sdp )
...
@@ -1258,7 +1264,7 @@ static sdp_t * ParseSDP( vlc_object_t *p_obj, char* psz_sdp )
return
p_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_port
)
{
{
int
i_fd
=
net_OpenUDP
(
p_sd
,
psz_address
,
i_port
,
NULL
,
0
);
int
i_fd
=
net_OpenUDP
(
p_sd
,
psz_address
,
i_port
,
NULL
,
0
);
...
@@ -1405,14 +1411,3 @@ static vlc_bool_t IsSameSession( sdp_t *p_sdp1, sdp_t *p_sdp2 )
...
@@ -1405,14 +1411,3 @@ static vlc_bool_t IsSameSession( sdp_t *p_sdp1, sdp_t *p_sdp2 )
return
VLC_FALSE
;
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