|
|
1.1 ! root 1: /* daplist.c - */ ! 2: ! 3: #ifndef lint ! 4: static char *rcsid = "$Header: /f/osi/dsap/net/RCS/daplist.c,v 7.0 90/07/26 14:45:22 mrose Exp $"; ! 5: #endif ! 6: ! 7: /* ! 8: * $Header: /f/osi/dsap/net/RCS/daplist.c,v 7.0 90/07/26 14:45:22 mrose Exp $ ! 9: * ! 10: * ! 11: * $Log: daplist.c,v $ ! 12: * Revision 7.0 90/07/26 14:45:22 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_list (ad, id, arg, error, result) ! 34: int ad; ! 35: int * id; ! 36: struct ds_list_arg *arg; ! 37: struct ds_list_result *result; ! 38: struct DSError *error; ! 39: { ! 40: struct DAPindication di_s; ! 41: struct DAPindication * di = &(di_s); ! 42: ! 43: ++(*id); ! 44: ! 45: (void) DapList (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_ls; /* 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: (*error) = de->de_err; /* struct copy */ ! 67: return (DS_ERROR_REMOTE); ! 68: } ! 69: ! 70: case DI_PREJECT: ! 71: error->dse_type = DSE_REMOTEERROR; ! 72: return (DS_ERROR_PROVIDER); ! 73: ! 74: case DI_ABORT: ! 75: error->dse_type = DSE_REMOTEERROR; ! 76: return (DS_ERROR_CONNECT); ! 77: ! 78: default: ! 79: error->dse_type = DSE_REMOTEERROR; ! 80: return (DS_ERROR_PROVIDER); ! 81: } ! 82: } ! 83: ! 84: int DapList (ad, id, arg, di, asyn) ! 85: int ad; ! 86: int id; ! 87: struct ds_list_arg * arg; ! 88: struct DAPindication * di; ! 89: int asyn; ! 90: { ! 91: PE arg_pe; ! 92: ! 93: if(encode_DAS_ListArgument(&arg_pe,1,0,NULLCP,arg) != OK) ! 94: { ! 95: return(dapreject (di, DP_INVOKE, id, NULLCP, "List argument encoding failed")); ! 96: } ! 97: ! 98: return (DapInvokeReqAux (ad, id, OP_LIST, arg_pe, di, asyn)); ! 99: ! 100: } ! 101:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.