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
230ff455
Commit
230ff455
authored
Sep 09, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cosmetic
(nice reinvention of the while() loop, but I prefer while())
parent
d2d7e36d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
modules/access/ftp.c
modules/access/ftp.c
+6
-11
No files found.
modules/access/ftp.c
View file @
230ff455
...
...
@@ -2,6 +2,7 @@
* ftp.c: FTP input module
*****************************************************************************
* Copyright (C) 2001-2006 the VideoLAN team
* Copyright © 2006 Rémi Denis-Courmont
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr> - original code
...
...
@@ -100,24 +101,18 @@ static int Connect( access_t *p_access, access_sys_t *p_sys )
char
*
psz
;
/* *** Open a TCP connection with server *** */
msg_Dbg
(
p_access
,
"waiting for connection..."
);
p_sys
->
fd_cmd
=
fd
=
net_ConnectTCP
(
p_access
,
p_sys
->
url
.
psz_host
,
p_sys
->
url
.
i_port
);
if
(
fd
<
0
)
if
(
fd
==
-
1
)
{
msg_Err
(
p_access
,
"
failed to connect with server
"
);
msg_Err
(
p_access
,
"
connection failed
"
);
intf_UserFatal
(
p_access
,
VLC_FALSE
,
_
(
"Network interaction failed"
),
_
(
"VLC could not connect with the given server."
)
);
return
-
1
;
}
for
(
;;
)
{
if
(
ftp_ReadCommand
(
p_access
,
&
i_answer
,
NULL
)
!=
1
)
{
break
;
}
}
while
(
ftp_ReadCommand
(
p_access
,
&
i_answer
,
NULL
)
==
1
);
if
(
i_answer
/
100
!=
2
)
{
msg_Err
(
p_access
,
"connection rejected"
);
...
...
@@ -313,7 +308,7 @@ static int Open( vlc_object_t *p_this )
return
VLC_SUCCESS
;
exit_error:
if
(
p_sys
->
fd_cmd
>=
0
)
if
(
p_sys
->
fd_cmd
!=
-
1
)
net_Close
(
p_sys
->
fd_cmd
);
vlc_UrlClean
(
&
p_sys
->
url
);
free
(
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