⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 u_ccon.c

📁 ICCP Toolkit 是在 Tru64下开发Tase.2通信协议的开发包
💻 C
字号:
/************************************************************************//* SISCO SOFTWARE MODULE HEADER *****************************************//************************************************************************//*   (c) Copyright Systems Integration Specialists Company, Inc.,	*//*      	  1986 - 1997, All Rights Reserved.		        *//*									*//* MODULE NAME : u_ccon.c						*//* PRODUCT(S)  : MMSEASE						*//*									*//* MODULE DESCRIPTION : 						*//*	This module contains user confirm functions. These functions	*//*	are invoked from 'mms_req_serve' when the response to an        *//*	outstanding request is received. These functions should check	*//*	the resp_err member of the request control structure before	*//*	assuming returned data. 					*//*									*//* NOTES ON REQUEST INFORMATION :					*//*	In the user application, request information structures may be	*//*	committed when the request is made (e.g. for error recovery).	*//*	If so, these information buffers could be freed in the confirm	*//*	functions.  In the sample application, all request information	*//*	structures are automatic or handled when the request is issued. *//*									*//* GLOBAL FUNCTIONS DEFINED IN THIS MODULE :				*//*									*//* MODIFICATION LOG :							*//*  Date     Who   Rev			Comments			*//* --------  ---  ------   -------------------------------------------	*//* 05/21/97  MDE     01    Added 'ms_reset_init_param'			*//* 04/15/97  DSF   7.00    MMSEASE 7.0 release. See MODL70.DOC for	*//*			   history.					*//************************************************************************/#include "glbtypes.h"#include "sysincs.h"#include "mms_usr.h"#include "mms_pcon.h"#include "mms_vcon.h"#include "mms_pfil.h"#include "mms_vfil.h"#include "userdefs.h"#include "mmsop_en.h"#include "gvaldefs.h"#include "scrndefs.h"#include "fkeydefs.h"/************************************************************************//* For debug version, use a static pointer to avoid duplication of 	*//* __FILE__ strings.							*//************************************************************************/#ifdef DEBUG_SISCOstatic ST_CHAR *thisFileName = __FILE__;#endif/************************************************************************//************************************************************************//*			CONTEXT MANAGEMENT				*//************************************************************************//************************************************************************//* MV INITIATE								*//* NOTE : user MUST make use of VM function for initiate, so no 'u_mp_	*//* init_conf' function need be provided					*//************************************************************************/ST_VOID u_mv_init_conf (MMSREQ_PEND *req_ptr)  {#if MMS_INIT_EN & REQ_EN  if (mms_debug_sel & MMS_LOG_USR_CONF)    {    conf_info_print (req_ptr,"Initiate ");    if (req_ptr->resp_err == CNF_RESP_OK || req_ptr->resp_err == CNF_ERR_OK)      list_init_info ((INIT_INFO *) req_ptr->resp_info_ptr,SD_FALSE);    else      list_err_info (req_ptr);    conf_info_wait ();    }#endif#ifdef VM_ULDL  uldl_ctrl_tbl[req_ptr->chan].uldl_state = ULDL_IDLE;  if (uldl_ctrl_tbl[req_ptr->chan].fptr)    {    fclose (uldl_ctrl_tbl[req_ptr->chan].fptr);    uldl_ctrl_tbl[req_ptr->chan].fptr = NULL;    }#endif  ms_clr_mvreq (req_ptr);		/* clear the VM command info	*/  }/************************************************************************//* MP CONCLUDE								*//************************************************************************/ST_VOID u_mp_conclude_conf (MMSREQ_PEND *req_ptr)  {#if MMS_CONCLUDE_EN & REQ_EN  if (mms_debug_sel & MMS_LOG_USR_CONF)    {    conf_info_print (req_ptr,"Conclude");    if (req_ptr->resp_err)      list_err_info (req_ptr);    conf_info_wait ();    }#endif  }/************************************************************************//*			u_mp_conclude_done 				*//* This function is invoked when a release confirm is received OR when	*//* ACSE refuses the request. This signals the real termination of this	*//* connection.								*//************************************************************************/ST_VOID u_mp_conclude_done (ST_INT chan, ST_RET ret_code)  {  if (mms_debug_sel & MMS_LOG_USR_CONF)    {    clear_bottom ();    printf ("\n\n Conclude Complete for channel %d returned",chan);    printf ("\n Return code = %d",ret_code);    }  if (!ret_code)    {/* Take care of resource de-allocation for this channel.		*/    ms_clr_ind_que (chan,1);	/* don't want any more indications from */				/* the disconnected channel.		*/    ms_clr_rem_fctrl (chan);	/* release all remote file control for	*/				/* this channel 			*/    ms_clr_locl_fctrl (chan);	/* release all local file control for	*/				/* this channel, and close files.	*/    ms_reset_init_param (chan);    if (listen_sel[chan])		/* if this is a called channel	*/      mllp_ass_listen (chan);	/* post another listen			*/    }  }/************************************************************************//*			u_mp_abort_done 				*//* This function is invoked when an abort request has been completely	*//* processed. No action is required here, but may re-post listen, etc.	*//************************************************************************/ST_VOID u_mp_abort_done (ST_INT chan)  {  if (mms_debug_sel & MMS_LOG_USR_CONF)    {    clear_bottom ();    printf ("\n\n Abort complete for channel %d.",chan);    wait_msg ("");    }  ms_reset_init_param (chan);  if (listen_sel[chan])		/* if this is a called channel		*/    mllp_ass_listen (chan);	/* post another listen			*/  }/************************************************************************//*			u_init_resp_done 				*//* This function is invoked when an initiate response is complete and	*//* the channel is ready for other communication activity.		*//************************************************************************/ST_VOID u_init_resp_done (ST_INT chan)  {#ifdef DEBUG_SISCO  if (mms_debug_sel & MMS_LOG_USR_CONF)    {    clear_bottom ();    printf ("\n\n Initiate Response Complete for channel %d",chan);    }#endif  }/************************************************************************//* MP CANCEL								*//************************************************************************/#if MMS_CANCEL_EN & REQ_ENST_VOID u_mp_cancel_conf (MMSREQ_PEND *req_ptr, ST_BOOLEAN errdata_pres,	ERR_INFO *err_ptr)  {  if (mms_debug_sel & MMS_LOG_USR_CONF)    {    CLEARSCR;    printf ("\n MMS CANCEL RESPONSE RECEIVED\n");    if (req_ptr -> cancl_state == -1)      {      printf ("failed ");      if (errdata_pres)	printf ("for reason: error class = %d, error code = %d.",			err_ptr -> eclass,err_ptr -> code);      }    else if (req_ptr -> cancl_state == 2 || req_ptr -> cancl_state == 5)      printf ("successful ");    else      printf ("involved protocol errors ");    printf ("\nfor operation %u",req_ptr -> op);    printf ("\nwith invoke ID %lu on channel %d.",req_ptr -> id,			req_ptr -> chan);    printf ("\nProtocol machine currently in state %d.\n",			req_ptr -> cancl_state);    wait_msg ("");    (*menu_set_fun)();    }  }#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -