MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / libssh_open_dir

Function libssh_open_dir

libavformat/libssh.c:311–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311static 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
333static int libssh_read_dir(URLContext *h, AVIODirEntry **next)
334{

Callers

nothing calls this directly

Calls 3

libssh_connectFunction · 0.85
av_logFunction · 0.85
libssh_closeFunction · 0.85

Tested by

no test coverage detected