Lines Matching refs:req
394 struct smb_request *req = data->req.p.smb; in request_state() local
409 if(req->state != newstate) in request_state()
411 (void *)req, names[req->state], names[newstate]); in request_state()
414 req->state = newstate; in request_state()
422 struct smb_request *req; in smb_setup_connection() local
425 data->req.p.smb = req = calloc(1, sizeof(struct smb_request)); in smb_setup_connection()
426 if(!req) in smb_setup_connection()
539 struct smb_request *req = data->req.p.smb; in smb_format_message() local
550 h->tid = smb_swap16(req->tid); in smb_format_message()
705 struct smb_request *req = data->req.p.smb; in smb_send_open() local
707 const size_t byte_count = strlen(req->path) + 1; in smb_send_open()
726 strcpy(msg.bytes, req->path); in smb_send_open()
734 struct smb_request *req = data->req.p.smb; in smb_send_close() local
739 msg.fid = smb_swap16(req->fid); in smb_send_close()
755 struct smb_request *req = data->req.p.smb; in smb_send_read() local
756 curl_off_t offset = data->req.offset; in smb_send_read()
762 msg.fid = smb_swap16(req->fid); in smb_send_read()
776 struct smb_request *req = data->req.p.smb; in smb_send_write() local
777 curl_off_t offset = data->req.offset; in smb_send_write()
778 curl_off_t upload_size = data->req.size - data->req.bytecount; in smb_send_write()
787 msg->fid = smb_swap16(req->fid); in smb_send_write()
939 struct smb_request *req = data->req.p.smb; in smb_request_state() local
955 if(req->state == SMB_REQUESTING) { in smb_request_state()
977 switch(req->state) { in smb_request_state()
980 req->result = CURLE_REMOTE_FILE_NOT_FOUND; in smb_request_state()
982 req->result = CURLE_REMOTE_ACCESS_DENIED; in smb_request_state()
985 req->tid = smb_swap16(h->tid); in smb_request_state()
991 req->result = CURLE_REMOTE_FILE_NOT_FOUND; in smb_request_state()
993 req->result = CURLE_REMOTE_ACCESS_DENIED; in smb_request_state()
998 req->fid = smb_swap16(smb_m->fid); in smb_request_state()
999 data->req.offset = 0; in smb_request_state()
1001 data->req.size = data->state.infilesize; in smb_request_state()
1002 Curl_pgrsSetUploadSize(data, data->req.size); in smb_request_state()
1006 data->req.size = smb_swap64(smb_m->end_of_file); in smb_request_state()
1007 if(data->req.size < 0) { in smb_request_state()
1008 req->result = CURLE_WEIRD_SERVER_REPLY; in smb_request_state()
1012 Curl_pgrsSetDownloadSize(data, data->req.size); in smb_request_state()
1022 req->result = CURLE_RECV_ERROR; in smb_request_state()
1040 req->result = result; in smb_request_state()
1045 data->req.offset += len; in smb_request_state()
1051 req->result = CURLE_UPLOAD_FAILED; in smb_request_state()
1057 data->req.bytecount += len; in smb_request_state()
1058 data->req.offset += len; in smb_request_state()
1059 Curl_pgrsSetUploadCounter(data, data->req.bytecount); in smb_request_state()
1060 if(data->req.bytecount >= data->req.size) in smb_request_state()
1104 result = req->result; in smb_request_state()
1158 struct smb_request *req = data->req.p.smb; in smb_parse_url_path() local
1189 req->path = slash; in smb_parse_url_path()