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

Function libssh_create_sftp_session

libavformat/libssh.c:119–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119static av_cold int libssh_create_sftp_session(LIBSSHContext *libssh)
120{
121 if (!(libssh->sftp = sftp_new(libssh->session))) {
122 av_log(libssh, AV_LOG_ERROR, "SFTP session creation failed: %s\n", ssh_get_error(libssh->session));
123 return AVERROR(ENOMEM);
124 }
125
126 if (sftp_init(libssh->sftp) != SSH_OK) {
127 av_log(libssh, AV_LOG_ERROR, "Error initializing sftp session: %s\n", ssh_get_error(libssh->session));
128 return AVERROR(EIO);
129 }
130
131 return 0;
132}
133
134static av_cold int libssh_open_file(LIBSSHContext *libssh, int flags, const char *file)
135{

Callers 1

libssh_connectFunction · 0.85

Calls 1

av_logFunction · 0.85

Tested by

no test coverage detected