📄 u_icon.c
字号:
/************************************************************************//* SISCO SOFTWARE MODULE HEADER *****************************************//************************************************************************//* (c) Copyright Systems Integration Specialists Company, Inc., *//* 1986 - 1997, All Rights Reserved. *//* *//* MODULE NAME : u_icon.c *//* PRODUCT(S) : MMSEASE *//* *//* MODULE DESCRIPTION : *//* This module contains user defined code to service context *//* management indications. These functions are invoked from *//* the 'mms_ind_serve' function, and should perform the request *//* action. *//* *//* GLOBAL FUNCTIONS DEFINED IN THIS MODULE : *//* *//* MODIFICATION LOG : *//* Date Who Rev Comments *//* -------- --- ------ ------------------------------------------- *//* 05/27/98 RKR 04 readded favorite CHECKOUT_RESP code *//* Fixed error code in list_init_info. *//* 01/26/98 EJV 03 Changed param to ST_LONG in u_llp_error_ind *//* 10/22/97 RKR 02 changed mv_initiate_resp to mv_init_resp *//* 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 "mem_chk.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#define CHECKOUT_RESP/************************************************************************//************************************************************************//* CONTEXT MANAGEMENT *//************************************************************************//************************************************************************//* list_init_info *//* This function is a general initiate information print function, and *//* is used by both u_indic and u_confrm initiate functions. *//************************************************************************/ST_VOID list_init_info (INIT_INFO *init_ptr, ST_INT ind) {CS_INIT_INFO *cs_init_ptr;ST_INT i; if (init_ptr->mms_p_context_pres) { printf ("\n\n MMS CORE P-CONTEXT INITIATE"); if ((!ind && init_ptr->rslt.accept_context) || ind) { /* Indication or positive confirm received */ printf ("\n max segment size "); if (init_ptr->max_segsize_pres) printf ("= %ld",init_ptr->max_segsize); else printf ("not present"); printf ("\n max outst. requests calling "); printf ("= %d",init_ptr->maxreq_calling); printf ("\n max outst. requests called "); printf ("= %d",init_ptr->maxreq_called); printf ("\n max data nesting "); if (init_ptr->max_nest_pres) printf ("= %d",init_ptr->max_nest); else printf ("not present"); printf ("\n MMS initiate Detail : "); if (init_ptr->mms_detail_pres) { printf ("\n Version : %d ",init_ptr->version); printf ("\n Parameter Support : "); if (init_ptr->version == 0) list_bytes (init_ptr->param_supp, 1); /* DIS has 7 bits */ else list_bytes (init_ptr->param_supp, 2); /* IS has 11 bits */ printf ("\n Services : "); list_bytes (init_ptr->serv_supp,11); } else printf ("Not Present"); printf ("\n Core Context Position : %d\n",init_ptr->core_position); } else /* ERROR CONFIRM RECEIVED */ { if (init_ptr->rslt.err_info_pres) { printf (" : ERROR RESPONSE"); printf ("\n Class = %d, Code = %d", init_ptr->rslt.err.eclass , init_ptr->rslt.err.code); } else printf (" : ERROR : NO INFORMATION AVAILABLE"); } } else printf ("\n\n MMS CORE P-CONTEXT NOT PRESENT");/* Now look at each CS initiate */ cs_init_ptr = (CS_INIT_INFO *) (init_ptr+1); for (i = 0; i < init_ptr->num_cs_init; ++i, ++cs_init_ptr) { printf ("\n\n MMS CS P-CONTEXT INITIATE, CONTEXT = %04x", cs_init_ptr->p_context); if ((!ind && cs_init_ptr->rslt.accept_context) || ind) { /* Indication or positive confirm received */ printf ("\n Local Detail "); if (cs_init_ptr->local_detail_pres) printf ("= %ld",cs_init_ptr->local_detail); else printf ("not present"); printf ("\n max outst. requests calling "); printf ("= %d",cs_init_ptr->maxreq_calling); printf ("\n max outst. requests called "); printf ("= %d",cs_init_ptr->maxreq_called); printf ("\n max data nesting "); if (cs_init_ptr->max_nest_pres) printf ("= %d",cs_init_ptr->max_nest); else printf ("not present"); printf ("\n CS Initiate Information : \n"); list_bytes (cs_init_ptr->init_detail, cs_init_ptr->init_detail_len); } else /* ERROR CONFIRM RECEIVED */ { if (cs_init_ptr->rslt.err_info_pres) { printf (" : ERROR RESPONSE"); printf ("\n Class = %d, Code = %d", cs_init_ptr->rslt.err.eclass, cs_init_ptr->rslt.err.code); } else printf (" : ERROR, NO INFORMATION AVAILABLE"); } } /* for all CS initiates */ }/************************************************************************//* INITIATE *//************************************************************************/ST_UCHAR cs_init_resp_detail[] = {0x81,0x01,0x79};ST_VOID u_init_ind (MMSREQ_IND *req_info) {INIT_INFO *init_req;ST_INT code; init_req = (INIT_INFO *) req_info->req_info_ptr;#ifdef VM_ULDL uldl_ctrl_tbl[req_info->chan].uldl_state = ULDL_IDLE; if (uldl_ctrl_tbl[req_info->chan].fptr) { fclose (uldl_ctrl_tbl[req_info->chan].fptr); uldl_ctrl_tbl[req_info->chan].fptr = NULL; }#endif if (mms_debug_sel & MMS_LOG_USR_IND) { indic_info_print (req_info,"Initiate "); list_init_info (init_req,SD_TRUE); indic_info_wait (); /* allow user to see indic info */ }#ifdef CHECKOUT_RESP if (mms_debug_sel & MMS_LOG_USR_IND) { if (ask ("\n Do you want to respond positive (y,n) (default = y) : ",1)) mv_init_resp (req_info); else { code = 0; printf ("\n Enter Error Code (default = 0) : "); intget (&code); mp_init_err (req_info,8,(ST_INT16) code); } } else mv_init_resp (req_info);#else mv_init_resp (req_info);#endif }/************************************************************************//* CONCLUDE */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -