Commit | Line | Data |
---|---|---|
f522e28b C |
1 | /* dsapunbind1.c - DSAP: Maps D-UNBIND onto RO-UNBIND.REQUEST */ |
2 | ||
3 | #ifndef lint | |
4 | static char *rcsid = "$Header: /f/osi/dsap/net/RCS/dsapunbind1.c,v 7.1 91/02/22 09:21:27 mrose Interim $"; | |
5 | #endif | |
6 | ||
7 | /* | |
8 | * $Header: /f/osi/dsap/net/RCS/dsapunbind1.c,v 7.1 91/02/22 09:21:27 mrose Interim $ | |
9 | * | |
10 | * | |
11 | * $Log: dsapunbind1.c,v $ | |
12 | * Revision 7.1 91/02/22 09:21:27 mrose | |
13 | * Interim 6.8 | |
14 | * | |
15 | * Revision 7.0 90/07/26 14:46:01 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/dsap.h" | |
34 | ||
35 | /* \f D-UNBIND.REQUEST */ | |
36 | ||
37 | /* ARGSUSED */ | |
38 | ||
39 | int DUnBindRequest (sd, secs, dr, di) | |
40 | int sd; | |
41 | int secs; | |
42 | struct DSAPrelease * dr; | |
43 | struct DSAPindication * di; | |
44 | { | |
45 | int result; | |
46 | struct AcSAPrelease acr_s; | |
47 | struct AcSAPrelease * acr = &(acr_s); | |
48 | struct RoNOTindication rni_s; | |
49 | struct RoNOTindication * rni = &(rni_s); | |
50 | ||
51 | watch_dog ("RoUnBindRequest"); | |
52 | result = RoUnBindRequest (sd, NULLPE, secs, acr, rni); | |
53 | watch_dog_reset(); | |
54 | ||
55 | if (result == OK) | |
56 | { | |
57 | dr->dr_affirmative = acr->acr_affirmative; | |
58 | dr->dr_reason = acr->acr_reason; | |
59 | ACRFREE(acr); | |
60 | return (OK); | |
61 | } | |
62 | ||
63 | if (result == NOTOK) | |
64 | { | |
65 | return (ronot2dsaplose (di, "D-UNBIND.REQUEST", rni)); | |
66 | } | |
67 | ||
68 | return (result); | |
69 | } | |
70 | ||
71 | /* \f D-UNBIND.RETRY */ | |
72 | ||
73 | /* ARGSUSED */ | |
74 | ||
75 | int DUnBindRetry (sd, secs, dr, di) | |
76 | int sd; | |
77 | int secs; | |
78 | struct DSAPrelease * dr; | |
79 | struct DSAPindication * di; | |
80 | { | |
81 | int result; | |
82 | struct AcSAPrelease acr_s; | |
83 | struct AcSAPrelease * acr = &(acr_s); | |
84 | struct RoNOTindication rni_s; | |
85 | struct RoNOTindication * rni = &(rni_s); | |
86 | ||
87 | watch_dog ("RoUnBindRetry"); | |
88 | result = RoUnBindRetry (sd, secs, acr, rni); | |
89 | watch_dog_reset(); | |
90 | ||
91 | if (result == OK) | |
92 | { | |
93 | dr->dr_affirmative = acr->acr_affirmative; | |
94 | dr->dr_reason = acr->acr_reason; | |
95 | ACRFREE (acr); | |
96 | return (OK); | |
97 | } | |
98 | ||
99 | if (result == NOTOK) | |
100 | { | |
101 | return (ronot2dsaplose (di, "D-UNBIND.RETRY", rni)); | |
102 | } | |
103 | ||
104 | return (result); | |
105 | } | |
106 |