Lines Matching refs:rc

475   int rc = 0;  in ssh_knownhost()  local
536 rc = CURLKHSTAT_REJECT; in ssh_knownhost()
584 rc = func(data, knownkeyp, /* from the knownhosts file */ in ssh_knownhost()
592 rc = CURLKHSTAT_REJECT; in ssh_knownhost()
594 switch(rc) { in ssh_knownhost()
623 else if(rc == CURLKHSTAT_FINE_ADD_TO_FILE || in ssh_knownhost()
624 rc == CURLKHSTAT_FINE_REPLACE) { in ssh_knownhost()
779 int rc = 0; in ssh_check_fingerprint() local
786 rc = data->set.ssh_hostkeyfunc(data->set.ssh_hostkeyfunc_userp, in ssh_check_fingerprint()
789 if(rc!= CURLKHMATCH_OK) { in ssh_check_fingerprint()
891 int rc; in ssh_force_knownhost_key_type() local
941 rc = libssh2_session_method_pref(sshc->ssh_session, in ssh_force_knownhost_key_type()
943 if(rc) { in ssh_force_knownhost_key_type()
948 result = libssh2_session_error_to_CURLE(rc); in ssh_force_knownhost_key_type()
1126 int rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshp->path, in sftp_upload_init() local
1129 if(rc == LIBSSH2_ERROR_EAGAIN) { in sftp_upload_init()
1133 if(rc) { in sftp_upload_init()
1165 int rc = libssh2_session_last_errno(sshc->ssh_session); in sftp_upload_init() local
1167 if(LIBSSH2_ERROR_EAGAIN == rc) { in sftp_upload_init()
1172 if(LIBSSH2_ERROR_SFTP_PROTOCOL == rc) in sftp_upload_init()
1210 sftperr, rc); in sftp_upload_init()
1413 int rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshc->quote_path2, in sftp_quote_stat() local
1417 if(rc == LIBSSH2_ERROR_EAGAIN) { in sftp_quote_stat()
1421 if(rc && !sshc->acceptfail) { /* get those attributes */ in sftp_quote_stat()
1500 int rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshp->path, in sftp_download_stat() local
1503 if(rc == LIBSSH2_ERROR_EAGAIN) { in sftp_download_stat()
1507 if(rc || in sftp_download_stat()
1630 int rc = libssh2_sftp_readdir_ex(sshc->sftp_handle, in sftp_readdir() local
1634 if(rc == LIBSSH2_ERROR_EAGAIN) { in sftp_readdir()
1638 if(rc > 0) { in sftp_readdir()
1639 size_t readdir_len = (size_t) rc; in sftp_readdir()
1671 else if(rc == 0) { in sftp_readdir()
1674 else if(rc < 0) { in sftp_readdir()
1699 int rc = LIBSSH2_ERROR_NONE; in ssh_statemachine() local
1724 rc = session_startup(sshc->ssh_session, conn->sock[FIRSTSOCKET]); in ssh_statemachine()
1725 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
1728 if(rc) { in ssh_statemachine()
1731 failf(data, "Failure establishing ssh session: %d, %s", rc, err_msg); in ssh_statemachine()
1775 rc = libssh2_session_last_errno(sshc->ssh_session); in ssh_statemachine()
1776 if(rc == LIBSSH2_ERROR_EAGAIN) in ssh_statemachine()
1777 rc = LIBSSH2_ERROR_EAGAIN; in ssh_statemachine()
1780 sshc->actualcode = libssh2_session_error_to_CURLE(rc); in ssh_statemachine()
1797 rc = libssh2_userauth_publickey_fromfile_ex(sshc->ssh_session, in ssh_statemachine()
1803 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
1810 if(rc == 0) { in ssh_statemachine()
1818 if(rc == -1) { in ssh_statemachine()
1829 rc = 0; /* clear rc and continue */ in ssh_statemachine()
1840 rc = 0; /* clear rc and continue */ in ssh_statemachine()
1845 rc = libssh2_userauth_password_ex(sshc->ssh_session, conn->user, in ssh_statemachine()
1850 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
1853 if(rc == 0) { in ssh_statemachine()
1860 rc = 0; /* clear rc and continue */ in ssh_statemachine()
1896 rc = libssh2_agent_connect(sshc->ssh_agent); in ssh_statemachine()
1897 if(rc == LIBSSH2_ERROR_EAGAIN) in ssh_statemachine()
1899 if(rc < 0) { in ssh_statemachine()
1902 rc = 0; /* clear rc and continue */ in ssh_statemachine()
1915 rc = libssh2_agent_list_identities(sshc->ssh_agent); in ssh_statemachine()
1917 if(rc == LIBSSH2_ERROR_EAGAIN) in ssh_statemachine()
1919 if(rc < 0) { in ssh_statemachine()
1922 rc = 0; /* clear rc and continue */ in ssh_statemachine()
1936 rc = libssh2_agent_get_identity(sshc->ssh_agent, in ssh_statemachine()
1939 if(rc == LIBSSH2_ERROR_EAGAIN) in ssh_statemachine()
1942 if(rc == 0) { in ssh_statemachine()
1943 rc = libssh2_agent_userauth(sshc->ssh_agent, conn->user, in ssh_statemachine()
1946 if(rc < 0) { in ssh_statemachine()
1947 if(rc != LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
1955 if(rc < 0) in ssh_statemachine()
1957 else if(rc == 1) in ssh_statemachine()
1960 if(rc == LIBSSH2_ERROR_NONE) { in ssh_statemachine()
1967 rc = 0; /* clear rc and continue */ in ssh_statemachine()
1984 rc = libssh2_userauth_keyboard_interactive_ex(sshc->ssh_session, in ssh_statemachine()
1989 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
1992 if(rc == 0) { in ssh_statemachine()
2034 rc = LIBSSH2_ERROR_EAGAIN; in ssh_statemachine()
2052 rc = sftp_libssh2_realpath(sshc->sftp_session, ".", in ssh_statemachine()
2054 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2057 if(rc > 0) { in ssh_statemachine()
2059 sshp->readdir_filename[rc] = '\0'; in ssh_statemachine()
2162 rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshc->quote_path2, in ssh_statemachine()
2166 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2169 if(rc && !sshc->acceptfail) { in ssh_statemachine()
2184 rc = libssh2_sftp_symlink_ex(sshc->sftp_session, sshc->quote_path1, in ssh_statemachine()
2189 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2192 if(rc && !sshc->acceptfail) { in ssh_statemachine()
2207 rc = libssh2_sftp_mkdir_ex(sshc->sftp_session, sshc->quote_path1, in ssh_statemachine()
2210 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2213 if(rc && !sshc->acceptfail) { in ssh_statemachine()
2227 rc = libssh2_sftp_rename_ex(sshc->sftp_session, sshc->quote_path1, in ssh_statemachine()
2235 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2238 if(rc && !sshc->acceptfail) { in ssh_statemachine()
2253 rc = libssh2_sftp_rmdir_ex(sshc->sftp_session, sshc->quote_path1, in ssh_statemachine()
2255 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2258 if(rc && !sshc->acceptfail) { in ssh_statemachine()
2272 rc = libssh2_sftp_unlink_ex(sshc->sftp_session, sshc->quote_path1, in ssh_statemachine()
2274 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2277 if(rc && !sshc->acceptfail) { in ssh_statemachine()
2293 rc = libssh2_sftp_statvfs(sshc->sftp_session, sshc->quote_path1, in ssh_statemachine()
2297 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2300 if(rc && !sshc->acceptfail) { in ssh_statemachine()
2310 else if(rc == 0) { in ssh_statemachine()
2368 rc = libssh2_sftp_stat_ex(sshc->sftp_session, sshp->path, in ssh_statemachine()
2371 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2374 if(rc == 0) { in ssh_statemachine()
2426 rc = libssh2_sftp_mkdir_ex(sshc->sftp_session, sshp->path, in ssh_statemachine()
2429 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2434 if(rc < 0) { in ssh_statemachine()
2449 rc = 0; /* clear rc and continue */ in ssh_statemachine()
2473 rc = LIBSSH2_ERROR_EAGAIN; in ssh_statemachine()
2497 rc = in ssh_statemachine()
2504 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2541 rc = LIBSSH2_ERROR_EAGAIN; in ssh_statemachine()
2564 rc = LIBSSH2_ERROR_EAGAIN; in ssh_statemachine()
2589 rc = libssh2_sftp_close(sshc->sftp_handle); in ssh_statemachine()
2590 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2593 if(rc < 0) { in ssh_statemachine()
2597 infof(data, "Failed to close libssh2 file: %d %s", rc, err_msg); in ssh_statemachine()
2626 rc = libssh2_sftp_close(sshc->sftp_handle); in ssh_statemachine()
2627 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2630 if(rc < 0) { in ssh_statemachine()
2634 infof(data, "Failed to close libssh2 file: %d %s", rc, err_msg); in ssh_statemachine()
2639 rc = libssh2_sftp_shutdown(sshc->sftp_session); in ssh_statemachine()
2640 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2643 if(rc < 0) { in ssh_statemachine()
2693 rc = LIBSSH2_ERROR_EAGAIN; in ssh_statemachine()
2767 rc = LIBSSH2_ERROR_EAGAIN; in ssh_statemachine()
2811 rc = libssh2_channel_send_eof(sshc->ssh_channel); in ssh_statemachine()
2812 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2815 if(rc) { in ssh_statemachine()
2820 rc, err_msg); in ssh_statemachine()
2828 rc = libssh2_channel_wait_eof(sshc->ssh_channel); in ssh_statemachine()
2829 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2832 if(rc) { in ssh_statemachine()
2836 infof(data, "Failed to get channel EOF: %d %s", rc, err_msg); in ssh_statemachine()
2844 rc = libssh2_channel_wait_closed(sshc->ssh_channel); in ssh_statemachine()
2845 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2848 if(rc) { in ssh_statemachine()
2852 infof(data, "Channel failed to close: %d %s", rc, err_msg); in ssh_statemachine()
2860 rc = libssh2_channel_free(sshc->ssh_channel); in ssh_statemachine()
2861 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2864 if(rc < 0) { in ssh_statemachine()
2869 rc, err_msg); in ssh_statemachine()
2886 rc = libssh2_channel_free(sshc->ssh_channel); in ssh_statemachine()
2887 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2890 if(rc < 0) { in ssh_statemachine()
2895 rc, err_msg); in ssh_statemachine()
2901 rc = libssh2_session_disconnect(sshc->ssh_session, "Shutdown"); in ssh_statemachine()
2902 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2905 if(rc < 0) { in ssh_statemachine()
2910 rc, err_msg); in ssh_statemachine()
2930 rc = libssh2_agent_disconnect(sshc->ssh_agent); in ssh_statemachine()
2931 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2934 if(rc < 0) { in ssh_statemachine()
2939 rc, err_msg); in ssh_statemachine()
2952 rc = libssh2_session_free(sshc->ssh_session); in ssh_statemachine()
2953 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
2956 if(rc < 0) { in ssh_statemachine()
2960 infof(data, "Failed to free libssh2 session: %d %s", rc, err_msg); in ssh_statemachine()
3003 } while(!rc && (sshc->state != SSH_STOP)); in ssh_statemachine()
3005 if(rc == LIBSSH2_ERROR_EAGAIN) { in ssh_statemachine()
3335 int rc; in ssh_connect() local
3344 rc = libssh2_knownhost_readfile(sshc->kh, in ssh_connect()
3347 if(rc < 0) in ssh_connect()