Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
96b7100a
Commit
96b7100a
authored
Sep 16, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
var_CreateGetNEString simplications
parent
528f0214
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
24 deletions
+17
-24
src/network/udp.c
src/network/udp.c
+17
-24
No files found.
src/network/udp.c
View file @
96b7100a
...
...
@@ -321,17 +321,15 @@ net_IPv4Join (vlc_object_t *obj, int fd,
socklen_t
optlen
;
/* Multicast interface IPv4 address */
char
*
iface
=
var_CreateGetString
(
obj
,
"miface-addr"
);
if
(
iface
!=
NULL
)
char
*
iface
=
var_CreateGetNonEmptyString
(
obj
,
"miface-addr"
);
if
((
iface
!=
NULL
)
&&
(
inet_pton
(
AF_INET
,
iface
,
&
id
)
<=
0
))
{
if
((
*
iface
)
&&
(
inet_pton
(
AF_INET
,
iface
,
&
id
)
<=
0
))
{
msg_Err
(
obj
,
"invalid multicast interface address %s"
,
iface
);
free
(
iface
);
goto
error
;
}
msg_Err
(
obj
,
"invalid multicast interface address %s"
,
iface
);
free
(
iface
);
goto
error
;
}
free
(
iface
);
memset
(
&
opt
,
0
,
sizeof
(
opt
));
if
(
src
!=
NULL
)
...
...
@@ -428,18 +426,15 @@ net_SourceSubscribe (vlc_object_t *obj, int fd,
{
int
level
,
iid
=
0
;
char
*
iface
=
var_CreateGetString
(
obj
,
"miface"
);
char
*
iface
=
var_CreateGet
NonEmpty
String
(
obj
,
"miface"
);
if
(
iface
!=
NULL
)
{
if
(
*
iface
)
iid
=
if_nametoindex
(
iface
);
if
(
iid
==
0
)
{
iid
=
if_nametoindex
(
iface
);
if
(
iid
==
0
)
{
msg_Err
(
obj
,
"invalid multicast interface: %s"
,
iface
);
free
(
iface
);
return
-
1
;
}
msg_Err
(
obj
,
"invalid multicast interface: %s"
,
iface
);
free
(
iface
);
return
-
1
;
}
free
(
iface
);
}
...
...
@@ -661,19 +656,17 @@ int __net_ConnectDgram( vlc_object_t *p_this, const char *psz_host, int i_port,
if
(
i_hlim
>
0
)
net_SetMcastHopLimit
(
p_this
,
fd
,
ptr
->
ai_family
,
i_hlim
);
str
=
var_CreateGetString
(
p_this
,
"miface"
);
str
=
var_CreateGet
NonEmpty
String
(
p_this
,
"miface"
);
if
(
str
!=
NULL
)
{
if
(
*
str
)
net_SetMcastOut
(
p_this
,
fd
,
ptr
->
ai_family
,
str
,
NULL
);
net_SetMcastOut
(
p_this
,
fd
,
ptr
->
ai_family
,
str
,
NULL
);
free
(
str
);
}
str
=
var_CreateGetString
(
p_this
,
"miface-addr"
);
str
=
var_CreateGet
NonEmpty
String
(
p_this
,
"miface-addr"
);
if
(
str
!=
NULL
)
{
if
(
*
str
)
net_SetMcastOut
(
p_this
,
fd
,
ptr
->
ai_family
,
NULL
,
str
);
net_SetMcastOut
(
p_this
,
fd
,
ptr
->
ai_family
,
NULL
,
str
);
free
(
str
);
}
...
...
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