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
c1acae62
Commit
c1acae62
authored
Dec 03, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also show telnet specific commands when using "help" command in the telnet interface.
parent
82fd7dc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
modules/control/telnet.c
modules/control/telnet.c
+19
-8
No files found.
modules/control/telnet.c
View file @
c1acae62
...
...
@@ -126,31 +126,31 @@ struct intf_sys_t
vlm_t
*
mediatheque
;
};
/*
/*
* getPort: Decide which port to use. There are two possibilities to
* specify a port: integrated in the --telnet-host option with :PORT
* or using the --telnet-port option. The --telnet-port option has
* precedence.
* This code relies upon the fact the url.i_port is 0 if the :PORT
* precedence.
* This code relies upon the fact the url.i_port is 0 if the :PORT
* option is missing from --telnet-host.
*/
static
int
getPort
(
intf_thread_t
*
p_intf
,
vlc_url_t
url
,
int
i_port
)
{
// Print error if two different ports have been specified
if
(
url
.
i_port
!=
0
&&
i_port
!=
TELNETPORT_DEFAULT
&&
i_port
!=
TELNETPORT_DEFAULT
&&
url
.
i_port
!=
i_port
)
{
msg_Err
(
p_intf
,
"ignoring port %d and using %d"
,
url
.
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
;
return
i_port
;
}
if
(
url
.
i_port
!=
0
)
{
return
url
.
i_port
;
return
url
.
i_port
;
}
return
i_port
;
}
...
...
@@ -193,7 +193,7 @@ static int Open( vlc_object_t *p_this )
free
(
p_intf
->
p_sys
);
return
VLC_EGENERIC
;
}
msg_Info
(
p_intf
,
msg_Info
(
p_intf
,
"telnet interface started on interface %s %d"
,
url
.
psz_host
,
url
.
i_port
);
...
...
@@ -444,8 +444,19 @@ static void Run( intf_thread_t *p_intf )
vlm_ExecuteCommand
(
p_sys
->
mediatheque
,
cl
->
buffer_read
,
&
message
);
if
(
!
strncmp
(
cl
->
buffer_read
,
"help"
,
4
)
)
{
vlm_message_t
*
p_my_help
=
vlm_MessageNew
(
"Telnet Specific Commands:"
,
NULL
);
vlm_MessageAdd
(
p_my_help
,
vlm_MessageNew
(
"logout, quit, exit"
,
NULL
)
);
vlm_MessageAdd
(
p_my_help
,
vlm_MessageNew
(
"shutdown"
,
NULL
)
);
vlm_MessageAdd
(
message
,
p_my_help
);
}
Write_message
(
cl
,
message
,
NULL
,
WRITE_MODE_CMD
);
vlm_MessageDelete
(
message
);
}
}
}
...
...
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