Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
6ba83343
Commit
6ba83343
authored
Sep 03, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Telnet: fix arbitrary tick
parent
2ee13e89
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
modules/control/telnet.c
modules/control/telnet.c
+7
-4
No files found.
modules/control/telnet.c
View file @
6ba83343
...
@@ -246,9 +246,11 @@ static void Run( intf_thread_t *p_intf )
...
@@ -246,9 +246,11 @@ static void Run( intf_thread_t *p_intf )
for
(
const
int
*
pfd
=
p_sys
->
pi_fd
;
*
pfd
!=
-
1
;
pfd
++
)
for
(
const
int
*
pfd
=
p_sys
->
pi_fd
;
*
pfd
!=
-
1
;
pfd
++
)
nlisten
++
;
/* How many listening sockets do we have? */
nlisten
++
;
/* How many listening sockets do we have? */
/* FIXME: make sure config_* is cancel-safe */
psz_password
=
config_GetPsz
(
p_intf
,
"telnet-password"
);
psz_password
=
config_GetPsz
(
p_intf
,
"telnet-password"
);
vlc_cleanup_push
(
free
,
psz_password
);
while
(
!
intf_ShouldDie
(
p_intf
)
)
for
(
;;
)
{
{
unsigned
ncli
=
p_sys
->
i_clients
;
unsigned
ncli
=
p_sys
->
i_clients
;
struct
pollfd
ufd
[
ncli
+
nlisten
];
struct
pollfd
ufd
[
ncli
+
nlisten
];
...
@@ -272,8 +274,7 @@ static void Run( intf_thread_t *p_intf )
...
@@ -272,8 +274,7 @@ static void Run( intf_thread_t *p_intf )
ufd
[
ncli
+
i
].
revents
=
0
;
ufd
[
ncli
+
i
].
revents
=
0
;
}
}
/* FIXME: arbitrary tick */
switch
(
poll
(
ufd
,
sizeof
(
ufd
)
/
sizeof
(
ufd
[
0
]),
-
1
))
switch
(
poll
(
ufd
,
sizeof
(
ufd
)
/
sizeof
(
ufd
[
0
]),
500
))
{
{
case
-
1
:
case
-
1
:
if
(
net_errno
!=
EINTR
)
if
(
net_errno
!=
EINTR
)
...
@@ -286,6 +287,7 @@ static void Run( intf_thread_t *p_intf )
...
@@ -286,6 +287,7 @@ static void Run( intf_thread_t *p_intf )
continue
;
continue
;
}
}
int
canc
=
vlc_savecancel
();
/* check if there is something to do with the socket */
/* check if there is something to do with the socket */
for
(
unsigned
i
=
0
;
i
<
ncli
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
ncli
;
i
++
)
{
{
...
@@ -509,8 +511,9 @@ static void Run( intf_thread_t *p_intf )
...
@@ -509,8 +511,9 @@ static void Run( intf_thread_t *p_intf )
"Password:
\xff\xfb\x01
"
,
WRITE_MODE_PWD
);
"Password:
\xff\xfb\x01
"
,
WRITE_MODE_PWD
);
TAB_APPEND
(
p_sys
->
i_clients
,
p_sys
->
clients
,
cl
);
TAB_APPEND
(
p_sys
->
i_clients
,
p_sys
->
clients
,
cl
);
}
}
vlc_restorecancel
(
canc
);
}
}
free
(
psz_password
);
vlc_cleanup_run
(
);
}
}
static
void
Write_message
(
telnet_client_t
*
client
,
vlm_message_t
*
message
,
static
void
Write_message
(
telnet_client_t
*
client
,
vlm_message_t
*
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