|
|
1.1 root 1: /* oper_result.c - deal with result of an operation */
2:
3: #ifndef lint
4: static char *rcsid = "$Header: /f/osi/quipu/RCS/oper_result.c,v 7.2 90/07/09 14:46:25 mrose Exp $";
5: #endif
6:
7: /*
8: * $Header: /f/osi/quipu/RCS/oper_result.c,v 7.2 90/07/09 14:46:25 mrose Exp $
9: *
10: *
11: * $Log: oper_result.c,v $
12: * Revision 7.2 90/07/09 14:46:25 mrose
13: * sync
14: *
15: * Revision 7.1 90/04/18 08:49:57 mrose
16: * 6.2
17: *
18: * Revision 7.0 89/11/23 22:17:54 mrose
19: * Release 6.0
20: *
21: */
22:
23: /*
24: * NOTICE
25: *
26: * Acquisition, use, and distribution of this module and related
27: * materials are subject to the restrictions of a license agreement.
28: * Consult the Preface in the User's Manual for the full terms of
29: * this agreement.
30: *
31: */
32:
33:
34: /* LINTLIBRARY */
35:
36: #include "quipu/dsap.h"
37: #include "quipu/util.h"
38: #include "quipu/connection.h"
39:
40: extern LLog * log_dsap;
41: extern int dn_print();
42:
43: oper_result(cn, di)
44: struct connection * cn;
45: struct DSAPindication * di;
46: {
47: struct DSAPresult * dr = &(di->di_result);
48: struct oper_act * on;
49:
50: DLOG(log_dsap, LLOG_TRACE, ("oper_result()"));
51:
52: for(on=cn->cn_operlist; on != NULLOPER; on=on->on_next_conn)
53: {
54: if(on->on_id == dr->dr_id)
55: break;
56: }
57:
58: if(on == NULLOPER)
59: {
60: LLOG(log_dsap, LLOG_FATAL, ("Cannot find operation to match result"));
61: send_ro_ureject(cn->cn_ad, &(dr->dr_id), ROS_RRP_UNRECOG);
62: return;
63: }
64:
65: if (dr->dr_res.dcr_dsres.result_type != on->on_arg->dca_dsarg.arg_type)
66: {
67: LLOG(log_dsap, LLOG_NOTICE, ("oper_result - operation had been abandoned"));
68: send_ro_ureject(on->on_conn->cn_ad, &(dr->dr_id), ROS_RRP_MISTYPED);
69: oper_extract(on);
70: return;
71: }
72:
73: if(on->on_state == ON_ABANDONED)
74: {
75: LLOG(log_dsap, LLOG_NOTICE, ("oper_result - operation had been abandoned"));
76: oper_extract(on);
77: return;
78: }
79:
80: on->on_resp = (*di); /* struct copy */
81:
82: switch(on->on_type)
83: {
84: case ON_TYPE_X500:
85: task_result_wakeup (on);
86: break;
87: case ON_TYPE_SUBTASK:
88: subtask_result_wakeup (on);
89: break;
90: case ON_TYPE_BIND_COMPARE:
91: bind_compare_result_wakeup(on);
92: break;
93: case ON_TYPE_GET_DSA_INFO:
94: dsa_info_result_wakeup(on);
95: break;
96: case ON_TYPE_GET_EDB:
97: on->on_state = ON_COMPLETE;
98: break;
99: default:
100: LLOG(log_dsap, LLOG_EXCEPTIONS, ("oper_result: operation of unknown type"));
101: oper_extract(on);
102: break;
103: }
104: }
105:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.