* @return 0 on success, negative on error, positive on entry to discard. */
| 1038 | * @return 0 on success, negative on error, positive on entry to discard. |
| 1039 | */ |
| 1040 | static int ftp_parse_entry(URLContext *h, char *line, AVIODirEntry *next) |
| 1041 | { |
| 1042 | FTPContext *s = h->priv_data; |
| 1043 | |
| 1044 | switch (s->listing_method) { |
| 1045 | case MLSD: |
| 1046 | return ftp_parse_entry_mlsd(line, next); |
| 1047 | case NLST: |
| 1048 | return ftp_parse_entry_nlst(line, next); |
| 1049 | case UNKNOWN_METHOD: |
| 1050 | default: |
| 1051 | return -1; |
| 1052 | } |
| 1053 | } |
| 1054 | |
| 1055 | static int ftp_read_dir(URLContext *h, AVIODirEntry **next) |
| 1056 | { |
no test coverage detected