Annotation of 43BSDTahoe/new/xns/examples/filing_common/filing_errors.c, revision 1.1

1.1     ! root        1: #ifndef lint
        !             2: static char *rcsid = "$Header: filing_errors.c,v 1.2 87/03/31 14:34:45 ed Exp $";
        !             3: #endif lint
        !             4: 
        !             5: /*
        !             6:  * Copyright (c) 1986, 1987 Xerox Corporation.
        !             7:  */
        !             8: 
        !             9: /* $Log:       filing_errors.c,v $
        !            10:  * Revision 1.2  87/03/31  14:34:45  ed
        !            11:  * Added Filing version 5 support.
        !            12:  * Corrected inconsistent use of prob in many routines.
        !            13:  * 
        !            14:  * Revision 1.1  87/01/14  11:25:56  ed
        !            15:  * Initial revision
        !            16:  * 
        !            17:  *
        !            18:  */
        !            19: 
        !            20: #include <sys/types.h>
        !            21: #include <netns/ns.h>
        !            22: #include <netns/sp.h>
        !            23: #ifdef FILING4
        !            24: #include "filingV4.h"
        !            25: #include "authenticationV2.h"
        !            26: #endif FILING4
        !            27: #ifdef FILING5
        !            28: #include "filingV5.h"
        !            29: #include "authenticationV2.h"
        !            30: #endif FILING5
        !            31: #ifdef FILING6
        !            32: #include "filingV6.h"
        !            33: #endif FILING6
        !            34: #ifdef FILINGSUBSET1
        !            35: #include "filingsubsetV1.h"
        !            36: #endif FILINGSUBSET1
        !            37: 
        !            38: 
        !            39: extern CourierConnection *_serverConnection;
        !            40: extern BDTabort_expected;
        !            41: 
        !            42: ReturnAccessError(prob)
        !            43: FILING_AccessProblem prob;
        !            44: {
        !            45:        LongCardinal error;
        !            46:        Cardinal problem;
        !            47: 
        !            48:        error= FILING_AccessError;
        !            49:        problem= (Cardinal) prob;
        !            50:        if ( BDTabort_expected )
        !            51:                BDTabort(_serverConnection);
        !            52:        raise(error,&problem);
        !            53:        /* NOT REACHED */
        !            54: }
        !            55: 
        !            56: ReturnAttributeTypeError(prob,type)
        !            57: FILING_ArgumentProblem prob;
        !            58: LongCardinal type;
        !            59: {
        !            60:        LongCardinal error;
        !            61:        FILING_AttributeTypeErrorArgs attribute_type_error;
        !            62: 
        !            63:        error= FILING_AttributeTypeError;
        !            64:        attribute_type_error.problem= prob;
        !            65:        attribute_type_error.type= type;
        !            66:        if ( BDTabort_expected )
        !            67:                BDTabort(_serverConnection);
        !            68:        raise(error,&attribute_type_error);
        !            69:        /* NOT REACHED */
        !            70: }
        !            71: 
        !            72: ReturnAttributeValueError(prob,type)
        !            73: FILING_ArgumentProblem prob;
        !            74: LongCardinal type;
        !            75: {
        !            76:        LongCardinal error;
        !            77:        static FILING_AttributeValueErrorArgs attribute_value_error;
        !            78: 
        !            79:        error= FILING_AttributeValueError;
        !            80:        attribute_value_error.problem= prob;
        !            81:        attribute_value_error.type= type;
        !            82:        if ( BDTabort_expected )
        !            83:                BDTabort(_serverConnection);
        !            84:        raise(error,&attribute_value_error);
        !            85:        /* NOT REACHED */
        !            86: }
        !            87: 
        !            88: #if FILING4 | FILING5
        !            89: ReturnAuthenticationError(prob)
        !            90: AUTHENTICATION_Problem prob;
        !            91: {
        !            92:        LongCardinal error;
        !            93:        Cardinal problem;
        !            94: 
        !            95:        error= FILING_AuthenticationError;
        !            96:        problem= (Cardinal) prob;
        !            97:        if ( BDTabort_expected )
        !            98:                BDTabort(_serverConnection);
        !            99:        raise(error,&problem);
        !           100:        /* NOT REACHED */
        !           101: }
        !           102: 
        !           103: #else FILING4 | FILING5        (the following is for FILING6 or FILINGSUBSET1)
        !           104: 
        !           105: ReturnAuthenticationError(prob)
        !           106: FILING_AuthenticationProblem prob;
        !           107: {
        !           108:        LongCardinal error;
        !           109:        static FILING_AuthenticationErrorArgs authentication_error;
        !           110:        static FILING_SecondaryItemType required_types[2];
        !           111:        static FILING_SecondaryType required_secondaries= { 2, required_types };
        !           112: 
        !           113:        required_types[0]= FILING_userName;
        !           114:        required_types[1]= FILING_userPassword;
        !           115:        error= FILING_AuthenticationError;
        !           116:        authentication_error.problem= prob;
        !           117:        authentication_error.type= required_secondaries;
        !           118:        if ( BDTabort_expected )
        !           119:                BDTabort(_serverConnection);
        !           120:        raise(error,&authentication_error);
        !           121:        /* NOT REACHED */
        !           122: }
        !           123: #endif FILING4 | FILING5
        !           124: 
        !           125: ReturnControlTypeError(prob,type)
        !           126: FILING_ArgumentProblem prob;
        !           127: Cardinal type;
        !           128: {
        !           129:        static FILING_ControlTypeErrorArgs control_type_error;
        !           130:        LongCardinal error;
        !           131: 
        !           132:        error= FILING_ControlTypeError;
        !           133:        control_type_error.problem= prob;
        !           134:        control_type_error.type= (FILING_ControlType)type;
        !           135:        if ( BDTabort_expected )
        !           136:                BDTabort(_serverConnection);
        !           137:        raise(error,&control_type_error);
        !           138:        /* NOT REACHED */
        !           139: }
        !           140: 
        !           141: ReturnControlValueError(prob,type)
        !           142: FILING_ArgumentProblem prob;
        !           143: Cardinal type;
        !           144: {
        !           145:        static FILING_ControlValueErrorArgs control_value_error;
        !           146:        LongCardinal error;
        !           147: 
        !           148:        error= FILING_ControlValueError;
        !           149:        control_value_error.problem= prob;
        !           150:        control_value_error.type= (FILING_ControlType)type;
        !           151:        if ( BDTabort_expected )
        !           152:                BDTabort(_serverConnection);
        !           153:        raise(error,&control_value_error);
        !           154:        /* NOT REACHED */
        !           155: }
        !           156: 
        !           157: ReturnHandleError(prob)
        !           158: FILING_HandleProblem prob;
        !           159: {
        !           160:        LongCardinal error;
        !           161:        Cardinal problem;
        !           162: 
        !           163:        error= FILING_HandleError;
        !           164:        problem= (Cardinal) prob;
        !           165:        if ( BDTabort_expected )
        !           166:                BDTabort(_serverConnection);
        !           167:        raise(error,&problem);
        !           168:        /* NOT REACHED */
        !           169: } 
        !           170: 
        !           171: ReturnInsertionError(prob)
        !           172: FILING_InsertionProblem prob;
        !           173: {
        !           174:        LongCardinal error;
        !           175:        Cardinal problem;
        !           176: 
        !           177:        error= FILING_InsertionError;
        !           178:        problem= (Cardinal) prob;
        !           179:        if ( BDTabort_expected )
        !           180:                BDTabort(_serverConnection);
        !           181:        raise(error,&problem);
        !           182:        /* NOT REACHED */
        !           183: } 
        !           184: 
        !           185: ReturnScopeTypeError(prob,type)
        !           186: FILING_ArgumentProblem prob;
        !           187: Cardinal type;
        !           188: {
        !           189:        static FILING_ScopeTypeErrorArgs scoptype_error;
        !           190:        LongCardinal error;
        !           191: 
        !           192:        error= FILING_ScopeTypeError;
        !           193:        scoptype_error.problem= prob;
        !           194:        scoptype_error.type= (FILING_ScopeType)type;
        !           195:        if ( BDTabort_expected )
        !           196:                BDTabort(_serverConnection);
        !           197:        raise(error,&scoptype_error);
        !           198:        /* NOT REACHED */
        !           199: }
        !           200: 
        !           201: ReturnScopeValueError(prob,type)
        !           202: FILING_ArgumentProblem prob;
        !           203: Cardinal type;
        !           204: {
        !           205:        static FILING_ScopeValueErrorArgs scope_value_error;
        !           206:        LongCardinal error;
        !           207: 
        !           208:        error= FILING_ScopeValueError;
        !           209:        scope_value_error.problem= prob;
        !           210:        scope_value_error.type= (FILING_ScopeType)type;
        !           211:        if ( BDTabort_expected )
        !           212:                BDTabort(_serverConnection);
        !           213:        raise(error,&scope_value_error);
        !           214:        /* NOT REACHED */
        !           215: }
        !           216: 
        !           217: ReturnServiceError(prob)
        !           218: FILING_ServiceProblem prob;
        !           219: {
        !           220:        LongCardinal error;
        !           221:        Cardinal problem;
        !           222: 
        !           223:        error= FILING_ServiceError;
        !           224:        problem= (Cardinal) prob;
        !           225:        if ( BDTabort_expected )
        !           226:                BDTabort(_serverConnection);
        !           227:        raise(error,&problem);
        !           228:        /* NOT REACHED */
        !           229: }
        !           230: 
        !           231: ReturnSessionError(prob)
        !           232: FILING_SessionProblem prob;
        !           233: {
        !           234:        LongCardinal error;
        !           235:        Cardinal problem;
        !           236: 
        !           237:        error= FILING_SessionError;
        !           238:        problem= (Cardinal) prob;
        !           239:        if ( BDTabort_expected )
        !           240:                BDTabort(_serverConnection);
        !           241:        raise(error,&problem);
        !           242:        /* NOT REACHED */
        !           243: }
        !           244: 
        !           245: ReturnSpaceError(prob)
        !           246: FILING_SpaceProblem prob;
        !           247: {
        !           248:        LongCardinal error;
        !           249:        Cardinal problem;
        !           250: 
        !           251:        error= FILING_SpaceError;
        !           252:        problem= (Cardinal) prob;
        !           253:        if ( BDTabort_expected )
        !           254:                BDTabort(_serverConnection);
        !           255:        raise(error,&problem);
        !           256:        /* NOT REACHED */
        !           257: } 
        !           258: 
        !           259: ReturnTransferError(prob)
        !           260: FILING_TransferProblem prob;
        !           261: {
        !           262:        LongCardinal error;
        !           263:        Cardinal problem;
        !           264: 
        !           265:        error= FILING_TransferError;
        !           266:        problem= (Cardinal) prob;
        !           267:        if ( BDTabort_expected )
        !           268:                BDTabort(_serverConnection);
        !           269:        raise(error,&problem);
        !           270:        /* NOT REACHED */
        !           271: }
        !           272: 
        !           273: ReturnUndefinedError(prob)
        !           274: FILING_UndefinedProblem prob;
        !           275: {
        !           276:        LongCardinal error;
        !           277:        Cardinal problem;
        !           278: 
        !           279:        error= FILING_UndefinedError;
        !           280:        problem= (Cardinal) prob;
        !           281:        if ( BDTabort_expected )
        !           282:                BDTabort(_serverConnection);
        !           283:        raise(error,&problem);
        !           284:        /* NOT REACHED */
        !           285: }
        !           286: 
        !           287: 
        !           288: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.