Changeset 3a6efa71fa6dc0b7d2427ef9380203ac4d060454
- Timestamp:
- 18/07/04 14:03:37
(4 years ago)
- Author:
- Laurent Aimar <fenrir@videolan.org>
- git-committer:
- Laurent Aimar <fenrir@videolan.org> 1090152217 +0000
- git-parent:
[760f9ce32b85710bdbca3b18478bdd2a044aa3a5]
- git-author:
- Laurent Aimar <fenrir@videolan.org> 1090152217 +0000
- Message:
- ftp: handle multiple lines answers.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r760f9ce |
r3a6efa7 |
|
| 451 | 451 | } |
|---|
| 452 | 452 | |
|---|
| | 453 | if( psz_line[3] == '-' ) /* Multiple response */ |
|---|
| | 454 | { |
|---|
| | 455 | char end[4]; |
|---|
| | 456 | |
|---|
| | 457 | memcpy( end, psz_line, 3 ); |
|---|
| | 458 | end[3] = ' '; |
|---|
| | 459 | |
|---|
| | 460 | for( ;; ) |
|---|
| | 461 | { |
|---|
| | 462 | char *psz_tmp = net_Gets( p_access, p_sys->fd_cmd ); |
|---|
| | 463 | |
|---|
| | 464 | if( psz_tmp == NULL ) /* Error */ |
|---|
| | 465 | break; |
|---|
| | 466 | |
|---|
| | 467 | if( !strncmp( psz_tmp, end, 4 ) ) |
|---|
| | 468 | { |
|---|
| | 469 | free( psz_tmp ); |
|---|
| | 470 | break; |
|---|
| | 471 | } |
|---|
| | 472 | free( psz_tmp ); |
|---|
| | 473 | } |
|---|
| | 474 | } |
|---|
| | 475 | |
|---|
| 453 | 476 | i_answer = atoi( psz_line ); |
|---|
| 454 | 477 | |
|---|