/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <afsconfig.h>
#include <afs/param.h>
+#include <roken.h>
-#include <sys/types.h>
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#else
-#include <netinet/in.h>
-#include <netdb.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <strings.h>
-#endif
-#include <stdio.h>
-#include <string.h>
#include <afs/com_err.h>
#include <lock.h>
#include <afs/bubasics.h>
#include <afs/tcdata.h>
#include <afs/butc.h>
+#include <afs/budb_client.h>
+#include <afs/bucoord_prototypes.h>
+
+#include "butc_internal.h"
#include "error_macros.h"
#include "butc_xbsa.h"
/* tape coordinator - task status management */
-extern statusP findStatus();
extern afs_int32 xbsaType;
dlqlinkT statusHead;
*/
afs_int32
-STC_GetStatus(call, taskId, statusPtr)
- struct rx_call *call;
- afs_uint32 taskId;
- struct tciStatusS *statusPtr;
+STC_GetStatus(struct rx_call *call, afs_uint32 taskId,
+ struct tciStatusS *statusPtr)
{
statusP ptr;
int retval = 0;
+ memset(statusPtr, 0, sizeof(*statusPtr));
if (callPermitted(call) == 0)
return (TC_NOTPERMITTED);
lock_Status();
ptr = findStatus(taskId);
if (ptr) {
- /* strcpy(statusPtr->status, ptr->status); */
-
strcpy(statusPtr->taskName, ptr->taskName);
strcpy(statusPtr->volumeName, ptr->volumeName);
statusPtr->taskId = ptr->taskId;
}
afs_int32
-STC_EndStatus(call, taskId)
- struct rx_call *call;
- afs_uint32 taskId;
+STC_EndStatus(struct rx_call *call, afs_uint32 taskId)
{
statusP ptr;
int retval = 0;
}
afs_int32
-STC_RequestAbort(call, taskId)
- struct rx_call *call;
- afs_uint32 taskId;
+STC_RequestAbort(struct rx_call *call, afs_uint32 taskId)
{
statusP ptr;
int retval = 0;
*/
afs_int32
-STC_ScanStatus(call, taskId, statusPtr, flags)
- struct rx_call *call;
- afs_uint32 *taskId;
- struct tciStatusS *statusPtr;
- afs_uint32 *flags;
+STC_ScanStatus(struct rx_call *call, afs_uint32 *taskId,
+ struct tciStatusS *statusPtr, afs_uint32 *flags)
{
statusP ptr = 0;
- statusP nextPtr = 0;
dlqlinkP dlqPtr;
+ memset(statusPtr, 0, sizeof(*statusPtr));
if (callPermitted(call) == 0)
return (TC_NOTPERMITTED);
* n - abort requested
*/
-checkAbortByTaskId(taskId)
- afs_uint32 taskId;
+int
+checkAbortByTaskId(afs_uint32 taskId)
{
statusP statusPtr;
int retval = 0;
- extern statusP findStatus();
-
lock_Status();
statusPtr = findStatus(taskId);
if (statusPtr) {
*/
afs_uint32
-getStatusFlag(taskId, flag)
- afs_uint32 taskId;
- afs_uint32 flag;
+getStatusFlag(afs_uint32 taskId, afs_uint32 flag)
{
statusP statusPtr;
int retval = 0;
- extern statusP findStatus();
lock_Status();
statusPtr = findStatus(taskId);