Annotation of 43BSDReno/contrib/isode-beta/dsap/net/dapcompare.c, revision 1.1.1.1

1.1       root        1: /* dapcompare.c - */
                      2: 
                      3: #ifndef        lint
                      4: static char *rcsid = "$Header: /f/osi/dsap/net/RCS/dapcompare.c,v 7.0 90/07/26 14:45:21 mrose Exp $";
                      5: #endif
                      6: 
                      7: /* 
                      8:  * $Header: /f/osi/dsap/net/RCS/dapcompare.c,v 7.0 90/07/26 14:45:21 mrose Exp $
                      9:  *
                     10:  *
                     11:  * $Log:       dapcompare.c,v $
                     12:  * Revision 7.0  90/07/26  14:45:21  mrose
                     13:  * *** empty log message ***
                     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 "quipu/util.h"
                     31: #include "quipu/dap2.h"
                     32: 
                     33: dap_compare (ad, id, arg, error, result)
                     34: int      ad;
                     35: int    * id;
                     36: struct ds_compare_arg       *arg;
                     37: struct ds_compare_result    *result;
                     38: struct DSError              *error;
                     39: {
                     40:     struct DAPindication         di_s;
                     41:     struct DAPindication       * di = &(di_s);
                     42: 
                     43:     ++(*id);
                     44: 
                     45:     (void) DapCompare (ad, (*id), arg, di, ROS_INTR);
                     46: 
                     47:     error->dse_type = DSE_NOERROR;
                     48: 
                     49:     switch (di->di_type)
                     50:     {
                     51:        case DI_RESULT:
                     52:        {
                     53:            struct DAPresult    * dr = &(di->di_result);
                     54: 
                     55:            /* Nasty struct copy */
                     56:            (*result) = dr->dr_res.res_cm;      /* struct copy */
                     57:            dr->dr_res.result_type = -1;        /* Prevent freeing */
                     58:            DRFREE (dr);
                     59:            return (DS_OK);
                     60:        }
                     61: 
                     62:        case DI_ERROR:
                     63:        {
                     64:            struct DAPerror     * de = &(di->di_error);
                     65: 
                     66:            /* Nasty struct copy */
                     67:            (*error) = de->de_err;                      /* struct copy */
                     68:            return (DS_ERROR_REMOTE);
                     69:        }
                     70: 
                     71:        case DI_PREJECT:
                     72:            error->dse_type = DSE_REMOTEERROR;
                     73:            return (DS_ERROR_PROVIDER);
                     74: 
                     75:        case DI_ABORT:
                     76:            error->dse_type = DSE_REMOTEERROR;
                     77:            return (DS_ERROR_CONNECT);
                     78: 
                     79:        default:
                     80:            error->dse_type = DSE_REMOTEERROR;
                     81:            return (DS_ERROR_PROVIDER);
                     82:     }
                     83: }
                     84: 
                     85: int      DapCompare (ad, id, arg, di, asyn)
                     86: int                      ad;
                     87: int                      id;
                     88: struct ds_compare_arg  * arg;
                     89: struct DAPindication   * di;
                     90: int                      asyn;
                     91: {
                     92:     PE                  arg_pe;
                     93: 
                     94:     if(encode_DAS_CompareArgument(&arg_pe,1,0,NULLCP,arg) != OK)
                     95:     {
                     96:        return(dapreject (di, DP_INVOKE, id, NULLCP, "Compare argument encoding failed"));
                     97:     }
                     98: 
                     99:     return (DapInvokeReqAux (ad, id, OP_COMPARE, arg_pe, di, asyn));
                    100: 
                    101: }
                    102: 

unix.superglobalmegacorp.com

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