Changeset 230ff455d6cf429d7e6bfb9db9eb9a206f819496
- Timestamp:
- 09/09/06 10:27:55
(2 years ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1157790475 +0000
- git-parent:
[d2d7e36de5200db692006284ce24646fa234d780]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1157790475 +0000
- Message:
More cosmetic
(nice reinvention of the while() loop, but I prefer while())
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rd2d7e36 |
r230ff45 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001-2006 the VideoLAN team |
|---|
| | 5 | * Copyright © 2006 Rémi Denis-Courmont |
|---|
| 5 | 6 | * $Id$ |
|---|
| 6 | 7 | * |
|---|
| … | … | |
| 101 | 102 | |
|---|
| 102 | 103 | /* *** Open a TCP connection with server *** */ |
|---|
| 103 | | msg_Dbg( p_access, "waiting for connection..." ); |
|---|
| 104 | 104 | p_sys->fd_cmd = fd = net_ConnectTCP( p_access, p_sys->url.psz_host, |
|---|
| 105 | 105 | p_sys->url.i_port ); |
|---|
| 106 | | if( fd < 0 ) |
|---|
| 107 | | { |
|---|
| 108 | | msg_Err( p_access, "failed to connect with server" ); |
|---|
| | 106 | if( fd == -1 ) |
|---|
| | 107 | { |
|---|
| | 108 | msg_Err( p_access, "connection failed" ); |
|---|
| 109 | 109 | intf_UserFatal( p_access, VLC_FALSE, _("Network interaction failed"), |
|---|
| 110 | 110 | _("VLC could not connect with the given server.") ); |
|---|
| … | … | |
| 112 | 112 | } |
|---|
| 113 | 113 | |
|---|
| 114 | | for( ;; ) |
|---|
| 115 | | { |
|---|
| 116 | | if( ftp_ReadCommand( p_access, &i_answer, NULL ) != 1 ) |
|---|
| 117 | | { |
|---|
| 118 | | break; |
|---|
| 119 | | } |
|---|
| 120 | | } |
|---|
| | 114 | while( ftp_ReadCommand( p_access, &i_answer, NULL ) == 1 ); |
|---|
| | 115 | |
|---|
| 121 | 116 | if( i_answer / 100 != 2 ) |
|---|
| 122 | 117 | { |
|---|
| … | … | |
| 314 | 309 | |
|---|
| 315 | 310 | exit_error: |
|---|
| 316 | | if( p_sys->fd_cmd >= 0 ) |
|---|
| | 311 | if( p_sys->fd_cmd != -1 ) |
|---|
| 317 | 312 | net_Close( p_sys->fd_cmd ); |
|---|
| 318 | 313 | vlc_UrlClean( &p_sys->url ); |
|---|