Commit | Line | Data |
---|---|---|
f522e28b C |
1 | /* dapmodrdn.c - */ |
2 | ||
3 | #ifndef lint | |
4 | static char *rcsid = "$Header: /f/osi/dsap/net/RCS/dapmodrdn.c,v 7.1 91/02/22 09:21:03 mrose Interim $"; | |
5 | #endif | |
6 | ||
7 | /* | |
8 | * $Header: /f/osi/dsap/net/RCS/dapmodrdn.c,v 7.1 91/02/22 09:21:03 mrose Interim $ | |
9 | * | |
10 | * | |
11 | * $Log: dapmodrdn.c,v $ | |
12 | * Revision 7.1 91/02/22 09:21:03 mrose | |
13 | * Interim 6.8 | |
14 | * | |
15 | * Revision 7.0 90/07/26 14:45:23 mrose | |
16 | * *** empty log message *** | |
17 | * | |
18 | */ | |
19 | ||
20 | /* | |
21 | * NOTICE | |
22 | * | |
23 | * Acquisition, use, and distribution of this module and related | |
24 | * materials are subject to the restrictions of a license agreement. | |
25 | * Consult the Preface in the User's Manual for the full terms of | |
26 | * this agreement. | |
27 | * | |
28 | */ | |
29 | ||
30 | ||
31 | /* LINTLIBRARY */ | |
32 | ||
33 | #include "quipu/util.h" | |
34 | #include "quipu/dap2.h" | |
35 | #include "../x500as/DAS-types.h" | |
36 | ||
37 | dap_modifyrdn (ad, id, arg, error) | |
38 | int ad; | |
39 | int * id; | |
40 | struct ds_modifyrdn_arg *arg; | |
41 | struct DSError *error; | |
42 | { | |
43 | struct DAPindication di_s; | |
44 | struct DAPindication * di = &(di_s); | |
45 | ||
46 | ++(*id); | |
47 | ||
48 | (void) DapModifyRDN (ad, (*id), arg, di, ROS_INTR); | |
49 | ||
50 | error->dse_type = DSE_NOERROR; | |
51 | ||
52 | switch (di->di_type) | |
53 | { | |
54 | case DI_RESULT: | |
55 | { | |
56 | struct DAPresult * dr = &(di->di_result); | |
57 | ||
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 DapModifyRDN (ad, id, arg, di, asyn) | |
85 | int ad; | |
86 | int id; | |
87 | struct ds_modifyrdn_arg * arg; | |
88 | struct DAPindication * di; | |
89 | int asyn; | |
90 | { | |
91 | PE arg_pe; | |
92 | ||
93 | if(encode_DAS_ModifyRDNArgument(&arg_pe,1,0,NULLCP,arg) != OK) | |
94 | { | |
95 | return(dapreject (di, DP_INVOKE, id, NULLCP, "ModifyRDN argument encoding failed")); | |
96 | } | |
97 | ||
98 | return (DapInvokeReqAux (ad, id, OP_MODIFYRDN, arg_pe, di, asyn)); | |
99 | ||
100 | } | |
101 |