Annotation of 43BSDReno/contrib/isode-beta/ftam/ftamshare.c, revision 1.1

1.1     ! root        1: /* ftamshare.c - FPM: encode/decode shared ASE information */
        !             2: 
        !             3: #ifndef        lint
        !             4: static char *rcsid = "$Header: /f/osi/ftam/RCS/ftamshare.c,v 7.0 89/11/23 21:53:53 mrose Rel $";
        !             5: #endif
        !             6: 
        !             7: /* 
        !             8:  * $Header: /f/osi/ftam/RCS/ftamshare.c,v 7.0 89/11/23 21:53:53 mrose Rel $
        !             9:  *
        !            10:  *
        !            11:  * $Log:       ftamshare.c,v $
        !            12:  * Revision 7.0  89/11/23  21:53:53  mrose
        !            13:  * Release 6.0
        !            14:  * 
        !            15:  */
        !            16: 
        !            17: /*
        !            18:  *                               NOTICE
        !            19:  *
        !            20:  *    Acquisition, use, and distribution of this module and related
        !            21:  *    materials are subject to the restrictions of a license agreement.
        !            22:  *    Consult the Preface in the User's Manual for the full terms of
        !            23:  *    this agreement.
        !            24:  *
        !            25:  */
        !            26: 
        !            27: 
        !            28: /* LINTLIBRARY */
        !            29: 
        !            30: #include <stdio.h>
        !            31: #include "fpkt.h"
        !            32: 
        !            33: /*  */
        !            34: 
        !            35: struct type_FTAM_Shared__ASE__Information *shared2fpm (fsb, sharedASE, fti)
        !            36: register struct ftamblk *fsb;
        !            37: PE     sharedASE;
        !            38: struct FTAMindication *fti;
        !            39: {
        !            40:     register struct type_FTAM_Shared__ASE__Information *fpm;
        !            41: 
        !            42:     if ((fpm = (struct type_FTAM_Shared__ASE__Information *)
        !            43:                    calloc (1, sizeof *fpm)) == NULL) {
        !            44:        (void) ftamlose (fti, FS_GEN (fsb), 1, NULLCP, "out of memory");
        !            45:        if (fpm)
        !            46:            free_FTAM_Shared__ASE__Information (fpm);
        !            47:        return NULL;
        !            48:     }
        !            49: 
        !            50:     fpm -> indirect__reference = sharedASE -> pe_context;
        !            51:     fpm -> encoding -> offset = choice_UNIV_0_single__ASN1__type;
        !            52:     (fpm -> encoding -> un.single__ASN1__type = sharedASE) -> pe_refcnt++;
        !            53: 
        !            54:     return fpm;
        !            55: }
        !            56: 
        !            57: /*  */
        !            58: 
        !            59: int    fpm2shared (fsb, fpm, sharedASE, fti)
        !            60: struct ftamblk *fsb;
        !            61: register struct type_FTAM_Shared__ASE__Information *fpm;
        !            62: PE    *sharedASE;
        !            63: struct FTAMindication *fti;
        !            64: {
        !            65:     PE     pe;
        !            66:     
        !            67:     if (fpm -> encoding -> offset != choice_UNIV_0_single__ASN1__type)
        !            68:        return ftamlose (fti, FS_GEN (fsb), 1, NULLCP,
        !            69:                         "shared ASE information not single-ASN1-type");
        !            70: 
        !            71:     if ((pe = pe_cpy (fpm -> encoding -> un.single__ASN1__type)) == NULLPE)
        !            72:        (void) ftamlose (fti, FS_GEN (fsb), 1, NULLCP, "out of memory");
        !            73:     (*sharedASE = pe) -> pe_context = fpm -> indirect__reference;
        !            74: 
        !            75:     return OK;
        !            76: }

unix.superglobalmegacorp.com

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