|
|
BSD 4.3reno
/* conn_dispatch.c - deal with an event on an open connection */
#ifndef lint
static char *rcsid = "$Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/quipu/conn_dispatch.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $";
#endif
/*
* $Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/quipu/conn_dispatch.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $
*
*
* $Log: conn_dispatch.c,v $
* Revision 1.1.1.1 2018/04/24 16:12:56 root
* BSD 4.3reno
*
* Revision 7.0 89/11/23 22:16:44 mrose
* Release 6.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 "quipu/dsap.h"
#include "tsap.h"
#include "quipu/util.h"
#include "quipu/connection.h"
extern LLog * log_dsap;
/*
* Something has happened on the association with descriptor "ad".
* Check what type of activity it is and dispatch to an appropriate
* routine to handle the activity.
*/
conn_dispatch(cn)
struct connection * cn;
{
int result;
struct DSAPindication di_s;
struct DSAPindication *di = &di_s;
struct DSAPabort *da = &(di->di_abort);
extern void ds_log();
DLOG (log_dsap,LLOG_TRACE,( "conn_dispatch()"));
watch_dog("DWaitRequest");
result = DWaitRequest(cn->cn_ctx, cn->cn_ad, OK, di);
watch_dog_reset();
if (result == DONE)
{
/* TIMER expired */
return;
}
if (result == NOTOK)
{
switch(di->di_type)
{
case DI_PREJECT:
DLOG(log_dsap, LLOG_DEBUG, ("conn_dispatch calling oper_preject"));
oper_preject(cn, &(di->di_preject));
return;
case DI_ABORT:
ds_log(da, "DWaitRequest");
DLOG(log_dsap, LLOG_DEBUG, ("conn_dispatch calling conn_extract"));
do_ds_unbind (cn);
conn_extract(cn);
return;
default:
LLOG (log_dsap,LLOG_EXCEPTIONS,( "Unknown indication type : %d", di->di_type));
return;
}
}
switch(di->di_type)
{
case DI_INVOKE:
if (task_invoke(cn, &(di->di_invoke)) != OK)
{
LLOG (log_dsap,LLOG_EXCEPTIONS,("task_invoke failed in conn_dispatch"));
}
break;
case DI_RESULT:
oper_result(cn, di);
break;
case DI_ERROR:
oper_error(cn, di);
break;
case DI_FINISH:
conn_finish(cn, &(di->di_finish));
break;
default:
LLOG (log_dsap,LLOG_EXCEPTIONS,( "Unknown indication type : %d", di->di_type));
break;
}
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.