|
|
1.1 root 1: /* rydispatch.c - ROSY: dispatch */
2:
3: #ifndef lint
4: static char *rcsid = "$Header: /f/osi/rosy/RCS/rydispatch.c,v 6.0 89/03/18 23:42:47 mrose Rel $";
5: #endif
6:
7: /*
8: * $Header: /f/osi/rosy/RCS/rydispatch.c,v 6.0 89/03/18 23:42:47 mrose Rel $
9: *
10: *
11: * $Log: rydispatch.c,v $
12: * Revision 6.0 89/03/18 23:42:47 mrose
13: * Release 5.0
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 <stdio.h>
31: #include "rosy.h"
32:
33:
34: #define missingP(p) \
35: { \
36: if (p == NULL) \
37: return rosaplose (roi, ROS_PARAMETER, NULLCP, \
38: "mandatory parameter \"%s\" missing", "p"); \
39: }
40:
41: /* DISPATCH */
42:
43: int RyDispatch (sd, ryo, op, fnx, roi)
44: int sd;
45: register struct RyOperation *ryo;
46: int op;
47: IFP fnx;
48: struct RoSAPindication *roi;
49: {
50: register struct dspblk *dsb;
51:
52: missingP (roi);
53:
54: if ((dsb = finddsblk (sd, op)) == NULLDSB) {
55: missingP (ryo);
56: missingP (fnx);
57:
58: for (; ryo -> ryo_name; ryo++)
59: if (ryo -> ryo_op == op)
60: break;
61: if (!ryo -> ryo_name)
62: return rosaplose (roi, ROS_PARAMETER, NULLCP,
63: "unknown operation code %d", op);
64:
65: if ((dsb = newdsblk (sd, ryo)) == NULLDSB)
66: return rosaplose (roi, ROS_CONGEST, NULLCP, NULLCP);
67: }
68: else
69: if (ryo)
70: dsb -> dsb_ryo = ryo;
71:
72: if ((dsb -> dsb_vector = fnx) == NULLIFP)
73: freedsblk (dsb);
74:
75: return OK;
76: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.