Lines Matching refs:rc

255   int rc;  in wsftp_send()  local
262 rc = wolfSSH_SFTP_SendWritePacket(sshc->ssh_session, sshc->handle, in wsftp_send()
267 if(rc == WS_FATAL_ERROR) in wsftp_send()
268 rc = wolfSSH_get_error(sshc->ssh_session); in wsftp_send()
269 if(rc == WS_WANT_READ) { in wsftp_send()
274 else if(rc == WS_WANT_WRITE) { in wsftp_send()
279 if(rc < 0) { in wsftp_send()
280 failf(data, "wolfSSH_SFTP_SendWritePacket returned %d", rc); in wsftp_send()
283 DEBUGASSERT(rc == (int)len); in wsftp_send()
287 return (ssize_t)rc; in wsftp_send()
297 int rc; in wsftp_recv() local
306 rc = wolfSSH_SFTP_SendReadPacket(sshc->ssh_session, sshc->handle, in wsftp_recv()
310 if(rc == WS_FATAL_ERROR) in wsftp_recv()
311 rc = wolfSSH_get_error(sshc->ssh_session); in wsftp_recv()
312 if(rc == WS_WANT_READ) { in wsftp_recv()
317 else if(rc == WS_WANT_WRITE) { in wsftp_recv()
323 DEBUGASSERT(rc <= (int)len); in wsftp_recv()
325 if(rc < 0) { in wsftp_recv()
326 failf(data, "wolfSSH_SFTP_SendReadPacket returned %d", rc); in wsftp_recv()
331 return (ssize_t)rc; in wsftp_recv()
371 int rc; in wssh_connect() local
402 rc = wolfSSH_SetUsername(sshc->ssh_session, conn->user); in wssh_connect()
403 if(rc != WS_SUCCESS) { in wssh_connect()
412 rc = wolfSSH_set_fd(sshc->ssh_session, (int)sock); in wssh_connect()
413 if(rc) { in wssh_connect()
449 int rc = 0; in wssh_statemach_act() local
459 rc = wolfSSH_connect(sshc->ssh_session); in wssh_statemach_act()
460 if(rc != WS_SUCCESS) in wssh_statemach_act()
461 rc = wolfSSH_get_error(sshc->ssh_session); in wssh_statemach_act()
462 if(rc == WS_WANT_READ) { in wssh_statemach_act()
467 else if(rc == WS_WANT_WRITE) { in wssh_statemach_act()
472 else if(rc != WS_SUCCESS) { in wssh_statemach_act()
483 rc = wolfSSH_SFTP_connect(sshc->ssh_session); in wssh_statemach_act()
484 if(rc != WS_SUCCESS) in wssh_statemach_act()
485 rc = wolfSSH_get_error(sshc->ssh_session); in wssh_statemach_act()
486 if(rc == WS_WANT_READ) { in wssh_statemach_act()
491 else if(rc == WS_WANT_WRITE) { in wssh_statemach_act()
496 else if(rc == WS_SUCCESS) { in wssh_statemach_act()
501 failf(data, "wolfssh SFTP connect error %d", rc); in wssh_statemach_act()
507 rc = wolfSSH_get_error(sshc->ssh_session); in wssh_statemach_act()
508 if(rc == WS_WANT_READ) { in wssh_statemach_act()
513 else if(rc == WS_WANT_WRITE) { in wssh_statemach_act()
518 else if(name && (rc == WS_SUCCESS)) { in wssh_statemach_act()
526 failf(data, "wolfssh SFTP realpath %d", rc); in wssh_statemach_act()
570 rc = wolfSSH_SFTP_STAT(sshc->ssh_session, sftp_scp->path, in wssh_statemach_act()
572 if(rc != WS_SUCCESS) in wssh_statemach_act()
575 if(rc) { in wssh_statemach_act()
602 rc = wolfSSH_SFTP_Open(sshc->ssh_session, sftp_scp->path, in wssh_statemach_act()
605 if(rc == WS_FATAL_ERROR) in wssh_statemach_act()
606 rc = wolfSSH_get_error(sshc->ssh_session); in wssh_statemach_act()
607 if(rc == WS_WANT_READ) { in wssh_statemach_act()
612 else if(rc == WS_WANT_WRITE) { in wssh_statemach_act()
617 else if(rc == WS_SUCCESS) { in wssh_statemach_act()
621 failf(data, "wolfssh SFTP upload open failed: %d", rc); in wssh_statemach_act()
714 rc = wolfSSH_SFTP_Open(sshc->ssh_session, sftp_scp->path, in wssh_statemach_act()
717 if(rc == WS_FATAL_ERROR) in wssh_statemach_act()
718 rc = wolfSSH_get_error(sshc->ssh_session); in wssh_statemach_act()
719 if(rc == WS_WANT_READ) { in wssh_statemach_act()
724 else if(rc == WS_WANT_WRITE) { in wssh_statemach_act()
729 else if(rc == WS_SUCCESS) { in wssh_statemach_act()
735 failf(data, "wolfssh SFTP open failed: %d", rc); in wssh_statemach_act()
742 rc = wolfSSH_SFTP_STAT(sshc->ssh_session, sftp_scp->path, &attrs); in wssh_statemach_act()
743 if(rc == WS_FATAL_ERROR) in wssh_statemach_act()
744 rc = wolfSSH_get_error(sshc->ssh_session); in wssh_statemach_act()
745 if(rc == WS_WANT_READ) { in wssh_statemach_act()
750 else if(rc == WS_WANT_WRITE) { in wssh_statemach_act()
755 else if(rc == WS_SUCCESS) { in wssh_statemach_act()
759 failf(data, "wolfssh SFTP open failed: %d", rc); in wssh_statemach_act()
812 rc = wolfSSH_SFTP_Close(sshc->ssh_session, sshc->handle, in wssh_statemach_act()
815 rc = WS_SUCCESS; /* directory listing */ in wssh_statemach_act()
816 if(rc == WS_WANT_READ) { in wssh_statemach_act()
821 else if(rc == WS_WANT_WRITE) { in wssh_statemach_act()
826 else if(rc == WS_SUCCESS) { in wssh_statemach_act()
831 failf(data, "wolfssh SFTP CLOSE failed: %d", rc); in wssh_statemach_act()
846 rc = wolfSSH_get_error(sshc->ssh_session); in wssh_statemach_act()
848 rc = WS_SUCCESS; in wssh_statemach_act()
850 if(rc == WS_WANT_READ) { in wssh_statemach_act()
855 else if(rc == WS_WANT_WRITE) { in wssh_statemach_act()
860 else if(name && (rc == WS_SUCCESS)) { in wssh_statemach_act()
885 failf(data, "wolfssh SFTP ls failed: %d", rc); in wssh_statemach_act()
897 } while(!rc && (sshc->state != SSH_STOP)); in wssh_statemach_act()