|
|
1.1 root 1: /* dapabandon.c - Send an abandon request */
2:
3: #ifndef lint
4: static char *rcsid = "$Header: /f/osi/dsap/net/RCS/dapabandon.c,v 7.0 90/07/26 14:45:19 mrose Exp $";
5: #endif
6:
7: /*
8: * $Header: /f/osi/dsap/net/RCS/dapabandon.c,v 7.0 90/07/26 14:45:19 mrose Exp $
9: *
10: *
11: * $Log: dapabandon.c,v $
12: * Revision 7.0 90/07/26 14:45:19 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: extern LLog * log_dsap;
34: void ros_log ();
35:
36: dap_abandon (ad, id, arg, error)
37: int ad;
38: int * id;
39: struct ds_abandon_arg *arg;
40: struct DSError *error;
41: {
42: struct DAPindication di_s;
43: struct DAPindication * di = &(di_s);
44:
45: ++(*id);
46:
47: (void) DapAbandon (ad, (*id), arg, di, ROS_INTR);
48:
49: error->dse_type = DSE_NOERROR;
50:
51: switch (di->di_type)
52: {
53: case DI_RESULT:
54: {
55: struct DAPresult * dr = &(di->di_result);
56:
57: DRFREE (dr);
58: return (DS_OK);
59: }
60:
61: case DI_ERROR:
62: {
63: struct DAPerror * de = &(di->di_error);
64:
65: (*error) = de->de_err; /* struct copy */
66: return (DS_ERROR_REMOTE);
67: }
68:
69: case DI_PREJECT:
70: error->dse_type = DSE_REMOTEERROR;
71: return (DS_ERROR_PROVIDER);
72:
73: case DI_ABORT:
74: error->dse_type = DSE_REMOTEERROR;
75: return (DS_ERROR_CONNECT);
76:
77: default:
78: error->dse_type = DSE_REMOTEERROR;
79: return (DS_ERROR_PROVIDER);
80: }
81: }
82:
83: int DapAbandon (ad, id, arg, di, asyn)
84: int ad;
85: int id;
86: struct ds_abandon_arg * arg;
87: struct DAPindication * di;
88: int asyn;
89: {
90: PE arg_pe;
91:
92: if(encode_DAS_AbandonArgument(&arg_pe,1,0,NULLCP,arg) != OK)
93: {
94: return(dapreject (di, DP_INVOKE, id, NULLCP, "Abandon argument encoding failed"));
95: }
96:
97: return (DapInvokeReqAux (ad, id, OP_ABANDON, arg_pe, di, asyn));
98:
99: }
100:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.