📄 u_icon.c
字号:
/************************************************************************/ST_VOID u_conclude_ind (MMSREQ_IND *req_info) {ST_INT code; if (mms_debug_sel & MMS_LOG_USR_IND) { indic_info_print (req_info,"Conclude"); if (ask ("\n Do you want to respond positive (y,n) (default = y) : ",1)) mp_conclude_resp (req_info); else { code = 0; printf ("\n Enter Error Code (default = 0) : "); intget (&code); mp_conclude_err (req_info,9,(ST_INT16) code); } indic_info (); } else mp_conclude_resp (req_info); }/************************************************************************//* ABORT *//************************************************************************/ST_VOID u_abort_ind (ST_INT chan, ST_INT reason, ST_BOOLEAN au_flag) { if (mms_debug_sel & MMS_LOG_USR_IND) { clear_bottom (); /* clear the bottom area */ printf ("\n\n CHANNEL %d ABORT RECEIVED", chan); if (!au_flag) printf ("\n AP_abort"); else printf ("\n AU_abort"); printf ("\n Reason = %d",reason); }/* 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_release_ind *//* This function is invoked when a release request has been rcv'd *//* This will typically happen after we have sent a positive conclude *//* response. MMSEASE will send a positive release response; the *//* connection is now terminated. *//************************************************************************/ST_VOID u_release_ind (ST_INT chan) {ST_RET ret;if (mms_debug_sel & MMS_LOG_USR_IND) { clear_bottom (); printf ("\n Release indication received for channel %d.",chan); wait_msg (""); } /* 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 */ { if ((ret = mllp_ass_listen (chan))) /* post another listen */ { printf ("\n Listen Error : %d",ret); wait_msg (""); } } }/************************************************************************//* u_mllp_req_timeout *//************************************************************************/ST_VOID u_mllp_req_timeout (ST_INT chan, MMSREQ_PEND *req_ptr) { mllp_cancel_req (req_ptr,11); }/************************************************************************//* CANCEL *//************************************************************************/#if MMS_CANCEL_EN & RESP_ENST_VOID u_cancel_ind (MMSREQ_IND *req_info) { if (mms_debug_sel & MMS_LOG_USR_IND) { indic_info_print (req_info,"Cancel "); printf ("\n Original Invoke ID : %lu",req_info->id); printf ("\n Op code of service cancelled : %d",req_info->op); }/* For demo, just call virtual machine responder function to respond *//* negatively to the cancel request. */ mv_cancel_resp (req_info,SD_FALSE); indic_info_wait (); /* allow user to see indic info */ }#endif/************************************************************************//* REJECT *//************************************************************************//* This function is called each time that a reject pdu is received from *//* the peer (parse error detected remotely), and each time that a parse *//* error is encountered locally. The reject is also indicated in the *//* u_mp_xxxx_conf or u_mv_xxxx_conf function call if the reject can be *//* paired with an existing request control structure. *//************************************************************************/extern ST_UINT _mmsdec_msglen; /* MMS decode message length */extern ST_UCHAR *_mmsdec_msgptr; /* MMS decode message ptr */ST_VOID u_reject_ind (ST_INT chan, REJECT_RESP_INFO *rej_ptr) { if (SD_TRUE || (mms_debug_sel & MMS_LOG_USR_IND)) { printf ("\n\nReject on channel %d",chan); if (rej_ptr == (REJECT_RESP_INFO *) 0) { printf ("\n serious parse problem - no information."); return; } printf ("\n detected "); if (rej_ptr->detected_here) printf ("here : \n pdu type = %u",rej_ptr->pdu_type); else printf ("at peer : "); printf ("\n invoke ID "); if (rej_ptr->invoke_known) printf ("= %lu",rej_ptr->invoke); else printf ("not known"); printf ("\n reject class : %d ",rej_ptr->rej_class); printf ("\n reject code : %d ",rej_ptr->rej_code); if (rej_ptr->detected_here) { printf ("\n PDU that caused reject: "); log_hex_bytes (stdout, _mmsdec_msgptr, _mmsdec_msglen); } indic_info_wait (); } }/************************************************************************//* u_llp_error_ind *//* This function is invoked when a LLP level request has failed. This *//* may or may not be a recoverable error. *//* The codes passed are defined in mms_llp.h *//************************************************************************/ST_VOID u_llp_error_ind (ST_INT chan, ST_LONG code) { clear_bottom (); printf ("\n LLP Error Indication received for channel %d, Code = 0x%08lx", chan,code);/* Not all SUIC's have s_map_err */#if 0 && defined (MAP30_ACSE) printf ("\n SUIC Error Code : %04x",s_map_err);#endif printf ("\n Error Description : "); ms_perror ((ST_RET) code); wait_msg (""); }/************************************************************************//* EXCEPTION *//************************************************************************//* This function is called if an internal error in MMS-EASE has *//* occurred. For example: the virtual machine enters an unrecoverable *//* state and must fail to perform some task, such as sending an MMS pdu *//* expected by the peer. At this point, the virtual machine simply *//* calls this function and resets itself. The seriousness of the error *//* depends on the errval argument, but often aborting the association *//* is called for. *//************************************************************************/ST_VOID u_mmsexcept_ind (ST_INT chan, ST_INT errval) { printf (" MMS exception on chan %d: ",chan); ms_perror (errval); /* print description of error */ wait_msg (""); (*menu_set_fun)(); }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -