| 309 | } |
| 310 | |
| 311 | static int libssh_open_dir(URLContext *h) |
| 312 | { |
| 313 | LIBSSHContext *libssh = h->priv_data; |
| 314 | int ret; |
| 315 | char path[MAX_URL_SIZE]; |
| 316 | |
| 317 | if ((ret = libssh_connect(h, h->filename, path, sizeof(path))) < 0) |
| 318 | goto fail; |
| 319 | |
| 320 | if (!(libssh->dir = sftp_opendir(libssh->sftp, path))) { |
| 321 | av_log(libssh, AV_LOG_ERROR, "Error opening sftp dir: %s\n", ssh_get_error(libssh->session)); |
| 322 | ret = AVERROR(EIO); |
| 323 | goto fail; |
| 324 | } |
| 325 | |
| 326 | return 0; |
| 327 | |
| 328 | fail: |
| 329 | libssh_close(h); |
| 330 | return ret; |
| 331 | } |
| 332 | |
| 333 | static int libssh_read_dir(URLContext *h, AVIODirEntry **next) |
| 334 | { |
nothing calls this directly
no test coverage detected