~ubuntu-branches/ubuntu/oneiric/openafs/oneiric-201305130334

« back to all changes in this revision

Viewing changes to src/butc/tcprocs.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2006-10-21 20:57:09 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20061021205709-y5keam1v20qxjwwo
Tags: 1.4.2-2
Upstream fix to prevent butc segfaulting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#include <afs/param.h>
14
14
 
15
15
RCSID
16
 
    ("$Header: /cvs/openafs/src/butc/tcprocs.c,v 1.12.2.2 2005/04/03 18:48:29 shadow Exp $");
 
16
    ("$Header: /cvs/openafs/src/butc/tcprocs.c,v 1.12.2.3 2006/07/01 05:04:12 shadow Exp $");
17
17
 
18
18
#include <sys/types.h>
19
19
#include <errno.h>
42
42
#include "error_macros.h"
43
43
#include "butc_xbsa.h"
44
44
 
45
 
callPermitted(call)
46
 
     struct rx_call *call;
 
45
int
 
46
callPermitted(struct rx_call *call)
47
47
{
48
48
    /* before this code can be used, the rx connection, on the bucoord side, must */
49
49
    /* be changed so that it will set up for token passing instead of using  a    */
57
57
 */
58
58
 
59
59
static int
60
 
CopyDumpDesc(toDump, fromDump)
61
 
     struct tc_dumpDesc *toDump;
62
 
     tc_dumpArray *fromDump;
 
60
CopyDumpDesc(struct tc_dumpDesc *toDump, tc_dumpArray *fromDump)
63
61
{
64
62
    struct tc_dumpDesc *toPtr, *fromPtr;
65
63
    int i;
82
80
 
83
81
 
84
82
static int
85
 
CopyRestoreDesc(toRestore, fromRestore)
86
 
     struct tc_restoreDesc *toRestore;
87
 
     tc_restoreArray *fromRestore;
 
83
CopyRestoreDesc(struct tc_restoreDesc *toRestore, tc_restoreArray *fromRestore)
88
84
{
89
85
    struct tc_restoreDesc *toPtr, *fromPtr;
90
86
    int i;
112
108
}
113
109
 
114
110
static int
115
 
CopyTapeSetDesc(toPtr, fromPtr)
116
 
     struct tc_tapeSet *toPtr, *fromPtr;
 
111
CopyTapeSetDesc(struct tc_tapeSet *toPtr, struct tc_tapeSet *fromPtr)
117
112
{
118
113
 
119
114
    toPtr->id = fromPtr->id;
134
129
 */
135
130
 
136
131
afs_int32
137
 
STC_LabelTape(acid, label, taskId)
138
 
     struct rx_call *acid;
139
 
     struct tc_tapeLabel *label;
140
 
     afs_uint32 *taskId;
 
132
STC_LabelTape(struct rx_call *acid, struct tc_tapeLabel *label, afs_uint32 *taskId)
141
133
{
142
134
#ifdef AFS_PTHREAD_ENV
143
135
    pthread_t pid;
217
209
 */
218
210
 
219
211
afs_int32
220
 
STC_PerformDump(rxCallId, tcdiPtr, tc_dumpArrayPtr, taskId)
221
 
     struct rx_call *rxCallId;
222
 
     struct tc_dumpInterface *tcdiPtr;
223
 
     tc_dumpArray *tc_dumpArrayPtr;
224
 
     afs_int32 *taskId;
 
212
STC_PerformDump(struct rx_call *rxCallId, struct tc_dumpInterface *tcdiPtr, tc_dumpArray *tc_dumpArrayPtr, afs_int32 *taskId)
225
213
{
226
214
    struct dumpNode *newNode = 0;
227
215
    statusP statusPtr = 0;
320
308
}
321
309
 
322
310
afs_int32
323
 
STC_PerformRestore(acid, dumpSetName, arestores, taskID)
324
 
     struct rx_call *acid;
325
 
     char *dumpSetName;         /* not used */
326
 
     tc_restoreArray *arestores;
327
 
     afs_int32 *taskID;
 
311
STC_PerformRestore(struct rx_call *acid, char *dumpSetName, tc_restoreArray *arestores, afs_int32 *taskID)
328
312
{
329
313
    struct dumpNode *newNode;
330
314
    statusP statusPtr;
401
385
}
402
386
 
403
387
afs_int32
404
 
STC_ReadLabel(acid, label, taskId)
405
 
     struct rx_call *acid;
406
 
     struct tc_tapeLabel *label;
407
 
     afs_uint32 *taskId;
 
388
STC_ReadLabel(struct rx_call *acid, struct tc_tapeLabel *label, afs_uint32 *taskId)
408
389
{
409
390
    afs_int32 code;
410
391
 
427
408
 */
428
409
 
429
410
afs_int32
430
 
STC_RestoreDb(rxCall, taskId)
431
 
     struct rx_call *rxCall;
432
 
     afs_uint32 *taskId;
 
411
STC_RestoreDb(struct rx_call *rxCall, afs_uint32 *taskId)
433
412
{
434
413
#ifdef AFS_PTHREAD_ENV
435
414
    pthread_t pid;
499
478
 */
500
479
 
501
480
afs_int32
502
 
STC_SaveDb(rxCall, archiveTime, taskId)
503
 
     struct rx_call *rxCall;
504
 
     Date archiveTime;
505
 
     afs_uint32 *taskId;
 
481
STC_SaveDb(struct rx_call *rxCall, Date archiveTime, afs_uint32 *taskId)
506
482
{
507
483
#ifdef AFS_PTHREAD_ENV
508
484
    pthread_t pid;
585
561
 */
586
562
 
587
563
afs_int32
588
 
STC_ScanDumps(acid, addDbFlag, taskId)
589
 
     struct rx_call *acid;
590
 
     afs_int32 addDbFlag;
591
 
     afs_uint32 *taskId;
 
564
STC_ScanDumps(struct rx_call *acid, afs_int32 addDbFlag, afs_uint32 *taskId)
592
565
{
593
566
#ifdef AFS_PTHREAD_ENV
594
567
    pthread_t pid;
667
640
 */
668
641
 
669
642
afs_int32
670
 
STC_TCInfo(acid, tciptr)
671
 
     struct rx_call *acid;
672
 
     struct tc_tcInfo *tciptr;
 
643
STC_TCInfo(struct rx_call *acid, struct tc_tcInfo *tciptr)
673
644
{
674
645
    if (callPermitted(acid) == 0)
675
646
        return (TC_NOTPERMITTED);
681
652
/* STC_DeleteDump
682
653
 */
683
654
afs_int32
684
 
STC_DeleteDump(acid, dumpID, taskId)
685
 
     struct rx_call *acid;
686
 
     afs_uint32 dumpID;
687
 
     afs_uint32 *taskId;
 
655
STC_DeleteDump(struct rx_call *acid, afs_uint32 dumpID, afs_uint32 *taskId)
688
656
{
689
657
    struct deleteDumpIf *ptr = 0;
690
658
    statusP statusPtr = 0;