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
2b29c3bd
Commit
2b29c3bd
authored
Sep 09, 2005
by
Jon Lech Johansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* bonjour.c: Fixed memory leaks. Fixed IPv6 support.
parent
a0d58179
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
modules/services_discovery/bonjour.c
modules/services_discovery/bonjour.c
+24
-5
No files found.
modules/services_discovery/bonjour.c
View file @
2b29c3bd
...
@@ -119,30 +119,49 @@ static void resolve_callback(
...
@@ -119,30 +119,49 @@ static void resolve_callback(
{
{
char
a
[
128
];
char
a
[
128
];
char
*
psz_uri
=
NULL
;
char
*
psz_uri
=
NULL
;
AvahiStringList
*
asl
;
char
*
psz_addr
=
NULL
;
AvahiStringList
*
asl
=
NULL
;
playlist_item_t
*
p_item
=
NULL
;
playlist_item_t
*
p_item
=
NULL
;
msg_Dbg
(
p_sd
,
"service '%s' of type '%s' in domain '%s'"
,
msg_Dbg
(
p_sd
,
"service '%s' of type '%s' in domain '%s'"
,
name
,
type
,
domain
);
name
,
type
,
domain
);
avahi_address_snprint
(
a
,
(
sizeof
(
a
)
/
sizeof
(
a
[
0
]))
-
1
,
address
);
avahi_address_snprint
(
a
,
(
sizeof
(
a
)
/
sizeof
(
a
[
0
]))
-
1
,
address
);
if
(
protocol
==
AVAHI_PROTO_INET6
)
asprintf
(
&
psz_addr
,
"[%s]"
,
a
);
asl
=
avahi_string_list_find
(
txt
,
"path"
);
if
(
txt
!=
NULL
)
asl
=
avahi_string_list_find
(
txt
,
"path"
);
if
(
asl
!=
NULL
)
if
(
asl
!=
NULL
)
{
{
size_t
size
;
size_t
size
;
char
*
key
=
NULL
;
char
*
key
=
NULL
;
char
*
value
=
NULL
;
char
*
value
=
NULL
;
if
(
avahi_string_list_get_pair
(
asl
,
&
key
,
&
value
,
&
size
)
==
0
)
if
(
avahi_string_list_get_pair
(
asl
,
&
key
,
&
value
,
&
size
)
==
0
&&
asprintf
(
&
psz_uri
,
"http://%s:%d%s"
,
a
,
port
,
value
);
value
!=
NULL
)
{
asprintf
(
&
psz_uri
,
"http://%s:%d%s"
,
psz_addr
!=
NULL
?
psz_addr
:
a
,
port
,
value
);
}
if
(
key
!=
NULL
)
avahi_free
(
(
void
*
)
key
);
if
(
value
!=
NULL
)
avahi_free
(
(
void
*
)
value
);
}
}
else
else
{
{
asprintf
(
&
psz_uri
,
"http://%s:%d"
,
a
,
port
);
asprintf
(
&
psz_uri
,
"http://%s:%d"
,
psz_addr
!=
NULL
?
psz_addr
:
a
,
port
);
}
}
if
(
psz_addr
!=
NULL
)
free
(
(
void
*
)
psz_addr
);
if
(
psz_uri
!=
NULL
)
if
(
psz_uri
!=
NULL
)
{
p_item
=
playlist_ItemNew
(
p_sd
,
psz_uri
,
name
);
p_item
=
playlist_ItemNew
(
p_sd
,
psz_uri
,
name
);
free
(
(
void
*
)
psz_uri
);
}
if
(
p_item
!=
NULL
)
if
(
p_item
!=
NULL
)
{
{
p_item
->
i_flags
&=
~
PLAYLIST_SKIP_FLAG
;
p_item
->
i_flags
&=
~
PLAYLIST_SKIP_FLAG
;
...
...
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