afs_ucred_t **acred)
{
struct vcache *avc;
- struct vrequest treq;
+ struct vrequest *treq = NULL;
afs_int32 code;
afs_int32 function, device;
struct afs_pdata input, output;
ICL_TYPE_POINTER, avc, ICL_TYPE_INT32, afollow);
AFS_STATCNT(HandlePioctl);
- code = afs_InitReq(&treq, *acred);
+ code = afs_CreateReq(&treq, *acred);
if (code)
return code;
afs_InitFakeStat(&fakestate);
if (avc) {
- code = afs_EvalFakeStat(&avc, &fakestate, &treq);
+ code = afs_EvalFakeStat(&avc, &fakestate, treq);
if (code)
goto out;
}
copyOutput = output;
code =
- (*pioctlSw[function]) (avc, function, &treq, ©Input,
+ (*pioctlSw[function]) (avc, function, treq, ©Input,
©Output, acred);
outSize = copyOutput.ptr - output.ptr;
afs_pd_free(&output);
afs_PutFakeStat(&fakestate);
- return afs_CheckCode(code, &treq, 41);
+ code = afs_CheckCode(code, treq, 41);
+ afs_DestroyReq(treq);
+ return code;
}
/*!
char *stp;
char *cellName;
int stLen;
- struct vrequest treq;
+ struct vrequest *treq = NULL;
afs_int32 flag, set_parent_pag = 0;
AFS_STATCNT(PSetTokens);
if (set_parent_pag) {
if (_settok_setParentPag(acred) == 0) {
- code = afs_InitReq(&treq, *acred);
+ code = afs_CreateReq(&treq, *acred);
if (code) {
return code;
}
- areq = &treq;
+ areq = treq;
}
}
afs_ResetUserConns(tu);
afs_NotifyUser(tu, UTokensObtained);
afs_PutUser(tu, WRITE_LOCK);
+ afs_DestroyReq(treq);
return 0;
}
int i, cellNum, primaryFlag;
XDR xdrs;
struct unixuser *tu;
- struct vrequest treq;
+ struct vrequest *treq = NULL;
struct ktc_setTokenData tokenSet;
struct ktc_tokenUnion decodedToken;
*acred = crref();
crfree(old_cred);
#endif
- code = afs_InitReq(&treq, *acred);
+ code = afs_CreateReq(&treq, *acred);
if (code) {
xdr_free((xdrproc_t) xdr_ktc_setTokenData, &tokenSet);
return code;
}
- areq = &treq;
+ areq = treq;
}
}
out:
afs_ResetUserConns(tu);
afs_PutUser(tu, WRITE_LOCK);
+ afs_DestroyReq(treq);
return code;
}