|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T r
Length: 4152 (0x1038) Types: TextFile Names: »rybind.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/dsap/net/rybind.c«
/* rybind.c - ROSY: bind */ #ifndef lint static char *rcsid = "$Header: /f/osi/dsap/net/RCS/rybind.c,v 6.0 89/03/18 23:29:05 mrose Rel $"; #endif /* * $Header: /f/osi/dsap/net/RCS/rybind.c,v 6.0 89/03/18 23:29:05 mrose Rel $ * * * $Log: rybind.c,v $ * Revision 6.0 89/03/18 23:29:05 mrose * Release 5.0 * */ /* * NOTICE * * Acquisition, use, and distribution of this module and related * materials are subject to the restrictions of a license agreement. * Consult the Preface in the User's Manual for the full terms of * this agreement. * */ /* LINTLIBRARY */ #include <stdio.h> #include "rosy.h" #include <varargs.h> /* \f BIND */ /* ARGSUSED */ int RyBind (ctx, calledaddr, ctxlist, defctxname, data, sversion, acc, aci) OID ctx; struct PSAPaddr *calledaddr; struct PSAPctxlist *ctxlist; OID defctxname; PE data; int sversion; struct AcSAPconnect *acc; struct AcSAPindication *aci; { int result; struct QOStype qos; struct SSAPref sfs; register struct SSAPref *sf; PE user_data; PE *user_datap = &(user_data); int ndata; if ((sf = addr2ref (PLocalHostName ())) == NULL) { sf = &sfs; (void) bzero ((char *) sf, sizeof *sf); } bzero ((char *) &qos, sizeof qos); qos.qos_sversion = sversion; /* Wrap the user data with the remote operations BIND tag */ if (data != NULLPE) { if (build_Remote__Operations__Notation_BindArgumentValue (user_datap, 1, 0, NULLPA, data) == NOTOK) { /* build_Remote__Operations__Notation_BindArgumentValue failed */ return NOTOK; } (*user_datap) -> pe_context = data->pe_context; ndata = 1; } else { ndata = 0; } /* The result of this procedure should be based upon parsing the result in the case of an A-ASSOCIATE.CONFIRM and the presence of this data */ if ((result = AcAssocRequest (ctx, NULLAEI, NULLAEI, NULLPA, calledaddr, ctxlist, defctxname, PR_MYREQUIRE, ROS_MYREQUIRE, SERIAL_NONE, 0, sf, user_datap, ndata, &qos, acc, aci)) == OK) { ParseRyBindResponse(acc); } return result; } int RyAsynBind (ctx, calledaddr, ctxlist, defctxname, data, sversion, acc, aci) OID ctx; struct PSAPaddr *calledaddr; struct PSAPctxlist *ctxlist; OID defctxname; PE data; int sversion; struct AcSAPconnect *acc; struct AcSAPindication *aci; { int result; struct QOStype qos; struct SSAPref sfs; register struct SSAPref *sf; PE user_data; PE *user_datap = &(user_data); int ndata; if ((sf = addr2ref (PLocalHostName ())) == NULL) { sf = &sfs; (void) bzero ((char *) sf, sizeof *sf); } bzero ((char *) &qos, sizeof qos); qos.qos_sversion = sversion; /* Wrap the user data with the remote operations BIND tag */ if (data != NULLPE) { if (build_Remote__Operations__Notation_BindArgumentValue (user_datap, 1, 0, NULLPA, data) == NOTOK) { /* build_Remote__Operations__Notation_BindArgumentValue failed */ return NOTOK; } (*user_datap) -> pe_context = data->pe_context; ndata = 1; } else { ndata = 0; } /* The result of this procedure should be based upon parsing the result in the case of an A-ASSOCIATE.CONFIRM and the presence of this data */ result = AcAsynAssocRequest (ctx, NULLAEI, NULLAEI, NULLPA, calledaddr, ctxlist, defctxname, PR_MYREQUIRE, ROS_MYREQUIRE, SERIAL_NONE, 0, sf, user_datap, ndata, &qos, acc, aci, ROS_ASYNC); return result; } ParseRyBindResponse (acc) struct AcSAPconnect *acc; { PE pe; if (acc->acc_info[0] != NULLPE) { pe = pe_cpy (acc->acc_info[0]); pe_free (acc->acc_info[0]); if (acc -> acc_result == ACS_ACCEPT) { if (parse_Remote__Operations__Notation_BindResultValue (pe, 1, NULL, NULLCP, &acc->acc_info[0]) != OK) { /* parse_Remote__Operations__Notation_BindResultValue failed */ acc->acc_info[0] = pe_cpy(pe); } } else { if (parse_Remote__Operations__Notation_BindErrorValue (pe, 1, NULL, NULLCP, &acc->acc_info[0]) != OK) { /* parse_Remote__Operations__Notation_BindErrorValue failed */ acc->acc_info[0] = pe_cpy(pe); } } pe_free (pe); } }