📄 icta_cfg.c
字号:
/************************************************************************/static ST_VOID cfgRemoteBegin (ST_VOID) { if (cfg_tbl_push (kwtblRemote) != SD_SUCCESS) cfg_set_config_err (); /* allocate memory for a remote */ pstCurrentRemote = chk_calloc(1, sizeof(ICTA_REMOTE_INFO)); memset(pstCurrentRemote, 0, sizeof(ICTA_REMOTE_INFO)); }/************************************************************************//* cfgRemoteName *//* found 'RemoteName' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteName (ST_VOID) {ST_CHAR *name = NULL; if ((name = cfg_get_string_ptr ()) != NULL) { strcpy(pstCurrentRemote->remoteName, name); } else cfg_set_config_err (); }/************************************************************************//* cfgRemoteVersion *//* found 'ICCPVersion' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteVersion (ST_VOID) {ST_CHAR *name = NULL; if ( ((name = cfg_get_string_ptr ()) != NULL) && pstCurrentRemote) { if (strcmp(name, "6.0") == 0) pstCurrentRemote->iccpVersion = ICCP_VERSION_60; else if (strcmp(name, "6.1") == 0) pstCurrentRemote->iccpVersion = ICCP_VERSION_1996_08; else cfg_set_config_err(); } else cfg_set_config_err (); }/************************************************************************//* cfgRemoteBilatID *//* found 'BilateralTableID' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteBilatID (ST_VOID) {ST_CHAR *name = NULL; if ( ((name = cfg_get_string_ptr ()) != NULL) && pstCurrentRemote) { strcpy(pstCurrentRemote->bilatTableID, name); } else cfg_set_config_err (); }/************************************************************************//* cfgRemoteLocalDom *//* found 'LocalDomainName' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteLocalDom (ST_VOID) {ST_CHAR *name = NULL; if ( ((name = cfg_get_string_ptr ()) != NULL) && pstCurrentRemote) { strcpy(pstCurrentRemote->localDom, name); } else cfg_set_config_err (); }/************************************************************************//* cfgRemoteRemoteDom *//* found 'RemoteDomainName' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteRemoteDom (ST_VOID) {ST_CHAR *name = NULL; if ( ((name = cfg_get_string_ptr ()) != NULL) && pstCurrentRemote) { strcpy(pstCurrentRemote->remoteDom, name); } else cfg_set_config_err (); }/************************************************************************//* cfgRemoteShortInt *//* found 'ShortestInterval' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteShortInt (ST_VOID) {ST_INT16 sVal; if ( (cfg_get_short ((ST_INT16 *) &sVal) == SD_SUCCESS) && pstCurrentRemote) pstCurrentRemote->nShortestInterval = (icInt) sVal; else cfg_set_config_err(); }/************************************************************************//* cfgRemoteReqTO *//* found 'RequestTimeout' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteReqTO (ST_VOID) {ST_INT16 sVal; if ( (cfg_get_short ((ST_INT16 *) &sVal) == SD_SUCCESS) && pstCurrentRemote) pstCurrentRemote->nReqTimeout = (icInt) sVal; else cfg_set_config_err(); }/************************************************************************//* cfgRemoteRetry *//* found 'RetryDelay' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteRetry (ST_VOID) {ST_INT16 sVal; if ( (cfg_get_short ((ST_INT16 *) &sVal) == SD_SUCCESS) && pstCurrentRemote) pstCurrentRemote->nRetries = (icInt) sVal; else cfg_set_config_err(); }/************************************************************************//* cfgRemoteReplyTO *//* found 'ReplyTimeout' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteReplyTO (ST_VOID) {ST_INT16 sVal; if ( (cfg_get_short ((ST_INT16 *) &sVal) == SD_SUCCESS) && pstCurrentRemote) pstCurrentRemote->nReplyTimeout = (icInt) sVal; else cfg_set_config_err(); }/************************************************************************//* cfgRemoteInitAssoc *//* found 'InitiateAssoc' keyword *//************************************************************************/static ST_VOID cfgRemoteInitAssoc (ST_VOID) { if (pstCurrentRemote) pstCurrentRemote->bInitiate = icTrue; else cfg_set_config_err(); }/************************************************************************//* cfgRemoteReqIdent *//* found 'ReqRemoteIdentity' keyword *//************************************************************************/static ST_VOID cfgRemoteReqIdent (ST_VOID) { if (pstCurrentRemote) pstCurrentRemote->bReqIdentity = icTrue; else cfg_set_config_err(); }/************************************************************************//* cfgRemoteLinkBegin *//************************************************************************/static ST_VOID cfgRemoteLinkBegin (ST_VOID) { if (cfg_tbl_push (kwtblRemoteLink) != SD_SUCCESS) cfg_set_config_err (); pstCurrentLink = chk_calloc(1, sizeof(ICTA_LINK_INFO)); memset(pstCurrentLink, 0, sizeof(ICTA_LINK_INFO)); }/************************************************************************//* cfgRemoteLinkName *//* found 'Name' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteLinkName (ST_VOID) {ST_CHAR *name = NULL; if (((name = cfg_get_string_ptr ()) != NULL) && pstCurrentLink) { strcpy(pstCurrentLink->linkName, name); } else cfg_set_config_err (); }/************************************************************************//* cfgRemoteLinkLocalAR *//* found 'LocalArName' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteLinkLocalAR (ST_VOID) {ST_CHAR *name = NULL; if (((name = cfg_get_string_ptr ()) != NULL) && pstCurrentLink) strcpy(pstCurrentLink->localAr, name); else cfg_set_config_err (); }/************************************************************************//* cfgRemoteLinkRemAR1 *//* found 'RemoteARName1' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteLinkRemAR1 (ST_VOID) {ST_CHAR *name = NULL; if (((name = cfg_get_string_ptr ()) != NULL) && pstCurrentLink) strcpy(pstCurrentLink->remoteArs[0], name); else cfg_set_config_err (); }/************************************************************************//* cfgRemoteLinkRemAR2 *//* found 'RemoteARName2' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteLinkRemAR2 (ST_VOID) {ST_CHAR *name = NULL; if (((name = cfg_get_string_ptr ()) != NULL) && pstCurrentLink) strcpy(pstCurrentLink->remoteArs[1], name); else cfg_set_config_err (); }/************************************************************************//* cfgRemoteLinkRemAR3 *//* found 'RemoteARName3' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteLinkRemAR3 (ST_VOID) {ST_CHAR *name = NULL; if (((name = cfg_get_string_ptr ()) != NULL) && pstCurrentLink) strcpy(pstCurrentLink->remoteArs[2], name); else cfg_set_config_err (); }/************************************************************************//* cfgRemoteLinkRemAR4 *//* found 'RemoteARName4' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteLinkRemAR4 (ST_VOID) {ST_CHAR *name = NULL; if (((name = cfg_get_string_ptr ()) != NULL) && pstCurrentLink) strcpy(pstCurrentLink->remoteArs[3], name); else cfg_set_config_err (); }/************************************************************************//* cfgRemoteLinkRemAR5 *//* found 'RemoteARName4' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteLinkRemAR5 (ST_VOID) {ST_CHAR *name = NULL; if (((name = cfg_get_string_ptr ()) != NULL) && pstCurrentLink) strcpy(pstCurrentLink->remoteArs[4], name); else cfg_set_config_err (); }/************************************************************************//* cfgRemoteLinkRemAR6 *//* found 'RemoteARName4' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteLinkRemAR6 (ST_VOID) {ST_CHAR *name = NULL; if (((name = cfg_get_string_ptr ()) != NULL) && pstCurrentLink) strcpy(pstCurrentLink->remoteArs[5], name); else cfg_set_config_err (); }/************************************************************************//* cfgRemoteLinkRemAR7 *//* found 'RemoteARName4' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteLinkRemAR7 (ST_VOID) {ST_CHAR *name = NULL; if (((name = cfg_get_string_ptr ()) != NULL) && pstCurrentLink) strcpy(pstCurrentLink->remoteArs[6], name); else cfg_set_config_err (); }/************************************************************************//* cfgRemoteLinkRemAR8 *//* found 'RemoteARName4' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteLinkRemAR8 (ST_VOID) {ST_CHAR *name = NULL; if (((name = cfg_get_string_ptr ()) != NULL) && pstCurrentLink) strcpy(pstCurrentLink->remoteArs[7], name); else cfg_set_config_err (); }/************************************************************************//* cfgRemoteLinkCritical *//* found 'CriticlaTimeout' keyword, get the value *//************************************************************************/static ST_VOID cfgRemoteLinkCritical (ST_VOID) {ST_INT16 sVal; if ( (cfg_get_short ((ST_INT16 *) &sVal) == SD_SUCCESS) && (pstCurrentLink) ) pstCurrentLink->nCriticalTimeout = (icInt) sVal; else cfg_set_config_err (); }/************************************************************************//* cfgRemoteLinkEnd *//************************************************************************/static ST_VOID cfgRemoteLinkEnd (ST_VOID) { if ( (pstCurrentLink) && (strlen(pstCurrentLink->linkName) > 0) ) { pstCurrentLink->nChannel = -1; list_add_last ((ST_VOID **)&pstCurrentRemote->linkList, pstCurrentLink); } if (cfg_tbl_pop (1) != SD_SUCCESS) cfg_set_config_err (); }/************************************************************************//* cfgRemoteServerBegin *//************************************************************************/static ST_VOID cfgRemoteServerBegin (ST_VOID) { if (cfg_tbl_push (kwtblServer) != SD_SUCCESS) cfg_set_config_err (); pstCurrentServer = chk_calloc(1, sizeof(ICTA_SERVER_INFO)); memset(pstCurrentServer, 0, sizeof(ICTA_SERVER_INFO)); pstCurrentRemote->bIsServer = icTrue; pstCurrentRemote->serverObj = pstCurrentServer; }/************************************************************************//* cfgServerFeaturesBegin *//************************************************************************/static ST_VOID cfgServerFeaturesBegin (ST_VOID) { if (cfg_tbl_push (kwtblServerFeatures) != SD_SUCCESS) cfg_set_config_err (); }/************************************************************************//* cfgFeaturesBlock2 *//* found 'Block2' keyword *//************************************************************************/static ST_VOID cfgFeaturesBlock2 (ST_VOID) { if (pstCurrentServer)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -