Home | History | Annotate | Download | only in lib

Lines Matching refs:req

208   struct smb_request *req = conn->data->req.protop;
223 if(req->state != newstate)
225 (void *)req, names[req->state], names[newstate]);
228 req->state = newstate;
233 struct smb_request *req;
236 conn->data->req.protop = req = calloc(1, sizeof(struct smb_request));
237 if(!req)
345 struct smb_request *req = conn->data->req.protop;
356 h->tid = smb_swap16(req->tid);
478 struct smb_request *req = conn->data->req.protop;
482 size_t byte_count = strlen(conn->host.name) + strlen(req->share);
494 MSGCATNULL(req->share);
505 struct smb_request *req = conn->data->req.protop;
509 if((strlen(req->path) + 1) > sizeof(msg.bytes))
515 byte_count = strlen(req->path);
527 strcpy(msg.bytes, req->path);
535 struct smb_request *req = conn->data->req.protop;
540 msg.fid = smb_swap16(req->fid);
556 struct smb_request *req = conn->data->req.protop;
557 curl_off_t offset = conn->data->req.offset;
563 msg.fid = smb_swap16(req->fid);
575 struct smb_request *req = conn->data->req.protop;
576 curl_off_t offset = conn->data->req.offset;
578 curl_off_t upload_size = conn->data->req.size - conn->data->req.bytecount;
585 msg->fid = smb_swap16(req->fid);
607 conn->data->req.upload_fromhere = conn->data->state.uploadbuffer;
724 struct smb_request *req = conn->data->req.protop;
735 if(req->state == SMB_REQUESTING) {
757 switch(req->state) {
760 req->result = CURLE_REMOTE_FILE_NOT_FOUND;
762 req->result = CURLE_REMOTE_ACCESS_DENIED;
765 req->tid = smb_swap16(h->tid);
771 req->result = CURLE_REMOTE_FILE_NOT_FOUND;
776 req->fid = smb_swap16(smb_m->fid);
777 conn->data->req.offset = 0;
779 conn->data->req.size = conn->data->state.infilesize;
780 Curl_pgrsSetUploadSize(conn->data, conn->data->req.size);
785 conn->data->req.size = smb_swap64(smb_m->end_of_file);
786 Curl_pgrsSetDownloadSize(conn->data, conn->data->req.size);
795 req->result = CURLE_RECV_ERROR;
813 req->result = result;
818 conn->data->req.bytecount += len;
819 conn->data->req.offset += len;
820 Curl_pgrsSetDownloadCounter(conn->data, conn->data->req.bytecount);
826 req->result = CURLE_UPLOAD_FAILED;
832 conn->data->req.bytecount += len;
833 conn->data->req.offset += len;
834 Curl_pgrsSetUploadCounter(conn->data, conn->data->req.bytecount);
835 if(conn->data->req.bytecount >= conn->data->req.size)
879 result = req->result;
900 struct smb_request *req = conn->data->req.protop;
904 Curl_safefree(req->share);
905 Curl_safefree(conn->data->req.protop);
913 struct smb_request *req = conn->data->req.protop;
921 if(req) {
922 Curl_safefree(req->share);
948 struct smb_request *req = data->req.protop;
958 req->share = strdup((*path == '/' || *path == '\\') ? path + 1 : path);
959 if(!req->share) {
965 slash = strchr(req->share, '/');
967 slash = strchr(req->share, '\\');
979 req->path = slash;