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
94c911fa
Commit
94c911fa
authored
Aug 24, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid pushing a full structure onto the stack
parent
c7edfac7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
18 deletions
+7
-18
modules/control/telnet.c
modules/control/telnet.c
+7
-18
No files found.
modules/control/telnet.c
View file @
94c911fa
...
@@ -142,24 +142,13 @@ struct intf_sys_t
...
@@ -142,24 +142,13 @@ struct intf_sys_t
* This code relies upon the fact the url.i_port is 0 if the :PORT
* This code relies upon the fact the url.i_port is 0 if the :PORT
* option is missing from --telnet-host.
* option is missing from --telnet-host.
*/
*/
static
int
getPort
(
intf_thread_t
*
p_intf
,
vlc_url_t
url
,
int
i_port
)
static
int
getPort
(
intf_thread_t
*
p_intf
,
const
vlc_url_t
*
url
,
int
i_port
)
{
{
if
(
i_port
==
TELNETPORT_DEFAULT
&&
url
->
i_port
!=
0
)
i_port
=
url
->
i_port
;
if
(
url
->
i_port
!=
0
&&
url
->
i_port
!=
i_port
)
// Print error if two different ports have been specified
// Print error if two different ports have been specified
if
(
url
.
i_port
!=
0
&&
msg_Warn
(
p_intf
,
"ignoring port %d (using %d)"
,
url
->
i_port
,
i_port
);
i_port
!=
TELNETPORT_DEFAULT
&&
url
.
i_port
!=
i_port
)
{
msg_Err
(
p_intf
,
"ignoring port %d and using %d"
,
url
.
i_port
,
i_port
);
}
if
(
i_port
!=
TELNETPORT_DEFAULT
)
{
return
i_port
;
}
if
(
url
.
i_port
!=
0
)
{
return
url
.
i_port
;
}
return
i_port
;
return
i_port
;
}
}
...
@@ -190,7 +179,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -190,7 +179,7 @@ static int Open( vlc_object_t *p_this )
// There might be two ports given, resolve any potentially
// There might be two ports given, resolve any potentially
// conflict
// conflict
url
.
i_port
=
getPort
(
p_intf
,
url
,
i_telnetport
);
url
.
i_port
=
getPort
(
p_intf
,
&
url
,
i_telnetport
);
p_intf
->
p_sys
=
malloc
(
sizeof
(
intf_sys_t
)
);
p_intf
->
p_sys
=
malloc
(
sizeof
(
intf_sys_t
)
);
if
(
!
p_intf
->
p_sys
)
if
(
!
p_intf
->
p_sys
)
...
...
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