retry:
tclient = h_FindClient_r(*tconn);
if (!tclient) {
- ViceLog(0, ("CallPreamble: Couldn't get client.\n"));
+ ViceLog(0, ("CallPreamble: Couldn't get client struct for host "
+ "%s:%d, sending busy signal\n",
+ afs_inet_ntoa_r(rx_HostOf(rx_PeerOf(*tconn)), hoststr),
+ (int)ntohs(rx_PortOf(rx_PeerOf(*tconn)))));
H_UNLOCK;
return VBUSY;
}
if (!retry_flag) {
h_ReleaseClient_r(tclient);
h_Release_r(thost);
- ViceLog(0, ("CallPreamble: Couldn't get CPS. Fail\n"));
+ ViceLog(0, ("CallPreamble: Couldn't get CPS for client from host "
+ "%s:%d, failing request\n",
+ afs_inet_ntoa_r(thost->host, hoststr),
+ (int)ntohs(thost->port)));
H_UNLOCK;
return -1001;
}
h_ReleaseClient_r(tclient);
h_Release_r(thost);
H_UNLOCK;
- ViceLog(0, ("CallPreamble: couldn't reconnect to ptserver\n"));
+ ViceLog(0, ("CallPreamble: couldn't reconnect to ptserver while "
+ "handling request for %s:%d\n",
+ afs_inet_ntoa_r(thost->host, hoststr),
+ (int)ntohs(thost->port)));
return -1001;
}
FDH_REALLYCLOSE(newFdP);
IH_RELEASE(newH);
FDH_REALLYCLOSE(targFdP);
- rc = IH_DEC(V_linkHandle(volptr), ino, V_parentId(volptr));
+ IH_DEC(V_linkHandle(volptr), ino, V_parentId(volptr));
free(buff);
VTakeOffline(volptr);
return EIO;
if (Caller & TVS_SDATA) {
targetptr->disk.dataVersion++;
if (!remote && VanillaUser(client)) {
- targetptr->disk.modeBits &= ~04000; /* turn off suid for file. */
+ /* turn off suid */
+ targetptr->disk.modeBits = targetptr->disk.modeBits & ~04000;
#ifdef CREATE_SGUID_ADMIN_ONLY
- targetptr->disk.modeBits &= ~02000; /* turn off sgid for file. */
+ /* turn off sgid */
+ targetptr->disk.modeBits = targetptr->disk.modeBits & ~02000;
#endif
}
}
if (InStatus->Mask & AFS_SETOWNER) {
/* admin is allowed to do chmod, chown as well as chown, chmod. */
if (!remote && VanillaUser(client)) {
- targetptr->disk.modeBits &= ~04000; /* turn off suid for file. */
+ /* turn off suid */
+ targetptr->disk.modeBits = targetptr->disk.modeBits & ~04000;
#ifdef CREATE_SGUID_ADMIN_ONLY
- targetptr->disk.modeBits &= ~02000; /* turn off sgid for file. */
+ /* turn off sgid */
+ targetptr->disk.modeBits = targetptr->disk.modeBits & ~02000;
#endif
}
targetptr->disk.owner = InStatus->Owner;
ViceLog(1, ("SAFS_GetStatistics64 Received\n"));
Statistics->ViceStatistics64_val =
- malloc(statsVersion*sizeof(afs_int64));
+ malloc(statsVersion*sizeof(afs_uint64));
Statistics->ViceStatistics64_len = statsVersion;
FS_LOCK;
AFSCallStats.GetStatistics++, AFSCallStats.TotalCalls++;
code = CallPostamble(tcon, code, thost);
- return 0;
+ return code;
}
/* client is held, but not locked */
/* Set the file's length; we've already done an lseek to the right
* spot above.
*/
+ tlen = 0; /* Just a source of data for the write */
nBytes = FDH_PWRITE(fdP, &tlen, 1, Pos);
if (nBytes != 1) {
errorCode = -1;