|
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 n
Length: 3137 (0xc41) Types: TextFile Names: »nw_ac_in_rsp.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape └─⟦eba4602b1⟧ »./isode-5.0.tar.Z« └─⟦d3ac74d73⟧ └─⟦this⟧ »isode-5.0/quipu/nw_ac_in_rsp.c«
/* nw_ac_in_resp.c - */ #ifndef lint static char *rcsid = "$Header: /f/osi/quipu/RCS/nw_ac_in_rsp.c,v 6.1 89/03/23 22:27:58 mrose Exp $"; #endif /* * $Header: /f/osi/quipu/RCS/nw_ac_in_rsp.c,v 6.1 89/03/23 22:27:58 mrose Exp $ * * * $Log: nw_ac_in_rsp.c,v $ * Revision 6.1 89/03/23 22:27:58 mrose * out-the-door * * Revision 6.0 89/03/18 23:41:46 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. * */ #include "acsap.h" #include "rosap.h" #include "quipu/util.h" #include "quipu/connection.h" extern LLog * log_dsap; #ifndef NO_STATS extern LLog * log_stat; extern int dn_print(); #endif Conn conn_alloc(); /* * Deal with an incoming acceptance of association establishment. * Return value says whether anything has happened or not. */ net_wait_init_response(conn) register struct connection * conn; { struct AcSAPconnect acc_s; struct AcSAPconnect *acc = &acc_s; struct AcSAPindication aci_s; struct AcSAPindication *aci = &aci_s; int nads; fd_set wads; struct PSAPindication pi_s; struct PSAPindication *pi = &(pi_s); DLOG (log_dsap,LLOG_TRACE,( "net_wait_init_response()")); nads = 0; FD_ZERO (&wads); if (PSelectMask (conn->cn_ad, &wads, &nads, pi) == NOTOK) { LLOG(log_dsap, LLOG_EXCEPTIONS, ("PSelect fail pre retry")); conn->cn_state = CN_STATE_FAIL; conn->cn_ad = 0; return; } if (conn->cn_state == CN_STATE_INIT) { if (xselect (nads, NULLFD, &wads, NULLFD, 1) == NOTOK) { LLOG(log_dsap, LLOG_EXCEPTIONS, ("xselect fail pre retry")); conn->cn_state = CN_STATE_FAIL; conn->cn_ad = 0; return; } } else { if (xselect (nads, &wads, NULLFD, NULLFD, 1) == NOTOK) { LLOG(log_dsap, LLOG_EXCEPTIONS, ("xselect fail pre retry")); conn->cn_state = CN_STATE_FAIL; conn->cn_ad = 0; return; } } switch(AcAsynRetryRequest(conn->cn_ad, acc, aci)) { case OK : LLOG (log_dsap,LLOG_EXCEPTIONS,( "A-ASSOCIATE.RETRY OK")); if (conn->cn_state == CN_STATE_INIT) conn->cn_state = CN_STATE_INIT2; break; case NOTOK : LLOG (log_dsap,LLOG_EXCEPTIONS,( "A-ASSOCIATE.RETRY NOTOK!")); conn->cn_state = CN_STATE_FAIL; conn->cn_ad = 0; break; case DONE : LLOG (log_dsap,LLOG_EXCEPTIONS,( "A-ASSOCIATE.RETRY DONE")); net_this_ac_aux(conn, acc); #ifndef NO_STATS if(conn->cn_state == CN_STATE_OPEN) { dn_decode(conn->cn_init_act.ia_resp.init_resp_res.dba_dn); pslog(log_stat, LLOG_NOTICE, "Bound to:", dn_print, (caddr_t) conn->cn_init_act.ia_resp.init_resp_res.dba_dn); } #endif ACCFREE(acc); break; default : LLOG (log_dsap,LLOG_EXCEPTIONS,( "Unexpected return from AcAsynRetryRequest")); conn->cn_state = CN_STATE_FAIL; conn->cn_ad = 0; break; } /* switch retry */ }