public void processSequence(COMPOUND4res compound4res, COMPOUND4args compound4args) { if (compound4res.resarray != null && compound4res.resarray.Length != 0 && compound4res.resarray[0].resop == nfs_opnum4.OP_SEQUENCE && compound4res.resarray[0].opsequence.sr_status == nfsstat4.NFS4_OK) { _lastUpdate = GetGMTInMS(); ++_sequenceID.value.value; //let's try this also if (compound4res.status == nfsstat4.NFS4ERR_DELAY) { compound4args.argarray[0].opsequence.sa_sequenceid.value.value++; } } }
public static COMPOUND4args generateCompound(String tag, List <nfs_argop4> opList) { System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding(); byte[] bytes = encoding.GetBytes(tag); COMPOUND4args compound4args = new COMPOUND4args(); compound4args.tag = new utf8str_cs(new utf8string(bytes)); compound4args.minorversion = new uint32_t(1); //compound4args.argarray = opList.ToArray(new nfs_argop4[opList.Count]); compound4args.argarray = opList.ToArray(); return(compound4args); }
private COMPOUND4res sendCompound(List <nfs_argop4> ops, String tag) { COMPOUND4res compound4res; COMPOUND4args compound4args = generateCompound(tag, ops); /* * wail if server is in the grace period. * * TODO: escape if it takes too long */ do { compound4res = _ProtocolV4.NFSPROC4_COMPOUND_4(compound4args); processSequence(compound4res, compound4args); } while (compound4res.status == nfsstat4.NFS4ERR_GRACE || compound4res.status == nfsstat4.NFS4ERR_DELAY); return(compound4res); }