DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T c

⟦8ae9e4948⟧ TextFile

    Length: 2546 (0x9f2)
    Types: TextFile
    Names: »conn_dispatch.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« 
        └─⟦de7628f85⟧ 
            └─⟦this⟧ »isode-6.0/quipu/conn_dispatch.c« 

TextFile

/* conn_dispatch.c - deal with an event on an open connection */

#ifndef lint
static char *rcsid = "$Header: /f/osi/quipu/RCS/conn_dispatch.c,v 7.0 89/11/23 22:16:44 mrose Rel $";
#endif

/*
 * $Header: /f/osi/quipu/RCS/conn_dispatch.c,v 7.0 89/11/23 22:16:44 mrose Rel $
 *
 *
 * $Log:	conn_dispatch.c,v $
 * 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 "rosap.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)
Conn      cn;
{
    struct RoSAPindication      roi_s;
    struct RoSAPindication      *roi = &roi_s;
    struct RoSAPpreject         *rop = &(roi->roi_preject);
    extern void ros_log();

    DLOG (log_dsap,LLOG_TRACE,( "conn_dispatch()"));

    watch_dog("RoWaitRequest");

    if(RoWaitRequest(cn->cn_ad, OK, roi) ==  NOTOK)
    {
	watch_dog_reset();
	ros_log(rop, "RoWaitRequest");
	if (ROS_FATAL(rop->rop_reason))
	{
	    DLOG(log_dsap, LLOG_DEBUG, ("conn_dispatch calling conn_extract"));
	    do_ds_unbind (cn);
	    conn_extract(cn);
	}
	return;
    }

    watch_dog_reset();

    switch(roi->roi_type)
    {
	case ROI_INVOKE:
	{
	    struct RoSAPinvoke  *rox = &(roi->roi_invoke);

	    if (task_invoke(cn, rox) != OK)
		LLOG (log_dsap,LLOG_EXCEPTIONS,("task_invoke failed in conn_dispatch"));
	    ROXFREE(rox);
	}
	break;

	case ROI_RESULT:
	{
	    struct RoSAPresult  *ror = &(roi->roi_result);

	    oper_result(cn, ror);
	    RORFREE(ror);
	}
	break;

	case ROI_ERROR:
	{
	    struct RoSAPerror   *roe = &(roi->roi_error);

	    oper_error(cn, roe);
	    ROEFREE(roe);
	}
	break;

	case ROI_UREJECT:
	{
	    struct RoSAPureject   *rou = &roi->roi_ureject;

	    oper_ureject(cn, rou);
	}
	break;

	case ROI_PREJECT:
	{
	     struct RoSAPpreject   *rop2 = &roi->roi_preject;

	     oper_preject(cn, rop2);
	     ROPFREE(rop2);
	}
	break;

	case ROI_FINISH:
	{
	    struct AcSAPfinish *acf = &roi->roi_finish;
	    conn_finish(cn, acf);
	}
	break;

	default:
	    LLOG (log_dsap,LLOG_EXCEPTIONS,( "Unknown indication type : %d", roi->roi_type));
	break;
    }
}