Lines Matching defs:state

138 /* This is the ONLY way to change SSH state! */
139 static void state(struct Curl_easy *data, sshstate nowstate)
211 if(sshc->state != nowstate) {
212 infof(data, "wolfssh %p state change from %s to %s",
213 (void *)sshc, names[sshc->state], names[nowstate]);
217 sshc->state = nowstate;
421 state(data, SSH_INIT);
423 state(data, SSH_SFTP_INIT);
433 * wssh_statemach_act() runs the SSH state machine as far as it can without
450 switch(sshc->state) {
452 state(data, SSH_S_STARTUP);
470 state(data, SSH_STOP);
474 state(data, SSH_STOP);
495 state(data, SSH_SFTP_REALPATH);
520 state(data, SSH_STOP);
530 state(data, SSH_STOP);
537 state(data, SSH_SFTP_QUOTE);
540 state(data, SSH_SFTP_GETINFO);
545 state(data, SSH_SFTP_FILETIME);
548 state(data, SSH_SFTP_TRANS_INIT);
552 if(data->state.upload)
553 state(data, SSH_SFTP_UPLOAD_INIT);
556 state(data, SSH_SFTP_READDIR_INIT);
558 state(data, SSH_SFTP_DOWNLOAD_INIT);
564 if(data->state.resume_from) {
566 if(data->state.resume_from < 0) {
573 data->state.resume_from = 0;
581 data->state.resume_from = size;
589 else if(data->state.resume_from > 0)
621 state(data, SSH_SFTP_DOWNLOAD_STAT);
625 if(data->state.resume_from > 0) {
630 seekerr = conn->seek_func(conn->seek_client, data->state.resume_from,
646 (data->state.resume_from - passed >
648 sizeof(scratch) : curlx_sotouz(data->state.resume_from - passed);
652 actuallyread = data->state.fread_func(scratch, 1,
654 data->state.in);
664 } while(passed < data->state.resume_from);
668 if(data->state.infilesize > 0) {
669 data->state.infilesize -= data->state.resume_from;
670 data->req.size = data->state.infilesize;
671 Curl_pgrsSetUploadSize(data, data->state.infilesize);
674 sshc->offset += data->state.resume_from;
676 if(data->state.infilesize > 0) {
677 data->req.size = data->state.infilesize;
678 Curl_pgrsSetUploadSize(data, data->state.infilesize);
687 state(data, SSH_SFTP_CLOSE);
698 data->state.select_bits = CURL_CSELECT_OUT;
701 state machine to move on as soon as possible so we set a very short
705 state(data, SSH_STOP);
728 state(data, SSH_SFTP_DOWNLOAD_STAT);
773 if(data->state.use_range || data->state.resume_from) {
783 state(data, SSH_STOP);
794 data->state.select_bits = CURL_CSELECT_IN;
797 /* this should never occur; the close state should be entered
799 state(data, SSH_SFTP_CLOSE);
803 state(data, SSH_STOP);
824 state(data, SSH_STOP);
834 state(data, SSH_STOP);
837 state(data, SSH_SFTP_READDIR);
865 state(data, SSH_SFTP_CLOSE);
879 state(data, SSH_STOP);
889 state(data, SSH_STOP);
894 } while(!rc && (sshc->state != SSH_STOP));
908 *done = (sshc->state == SSH_STOP) ? TRUE : FALSE;
942 state(data, SSH_SFTP_QUOTE_INIT);
944 /* run the state-machine */
969 sshc->secondCreateDirs = 0; /* reset the create dir attempt state
992 while((sshc->state != SSH_STOP) && !result) {
1043 /* run the state-machine */
1096 state(data, SSH_SFTP_CLOSE);
1123 state(data, SSH_SFTP_SHUTDOWN);