update
This commit is contained in:
parent
e8f67c6fb1
commit
8b3d4f1d03
@ -1390,13 +1390,13 @@ BOOLEAN CRYDevice::processRyADSParam(const Json::Value jsonRoot, int pid)
|
|||||||
//ads添加路由的用户名密码
|
//ads添加路由的用户名密码
|
||||||
//用户名
|
//用户名
|
||||||
if (jsonRoot["adsUser"].isString()) {
|
if (jsonRoot["adsUser"].isString()) {
|
||||||
config_config.processes[pid].option.ryads.user = atoi(jsonRoot["adsUser"].asCString());
|
snprintf(config_config.processes[pid].option.ryads.user, sizeof(config_config.processes[pid].option.ryads.user), "%s", jsonRoot["adsUser"].asCString());
|
||||||
} else { //默认存在允许ftp功能
|
} else { //默认存在允许ftp功能
|
||||||
snprintf(config_config.processes[pid].option.ryads.user, sizeof(config_config.processes[pid].option.ryads.user), "%s", "admin");
|
snprintf(config_config.processes[pid].option.ryads.user, sizeof(config_config.processes[pid].option.ryads.user), "%s", "admin");
|
||||||
}
|
}
|
||||||
//密码
|
//密码
|
||||||
if (jsonRoot["adsPassword"].isString()) {
|
if (jsonRoot["adsPassword"].isString()) {
|
||||||
config_config.processes[pid].option.ryads.password = atoi(jsonRoot["adsPassword"].asCString());
|
snprintf(config_config.processes[pid].option.ryads.password, sizeof(config_config.processes[pid].option.ryads.password), "%s", jsonRoot["adsPassword"].asCString());
|
||||||
} else { //默认存在允许ftp功能
|
} else { //默认存在允许ftp功能
|
||||||
snprintf(config_config.processes[pid].option.ryads.password, sizeof(config_config.processes[pid].option.ryads.password), "%s", "admin");
|
snprintf(config_config.processes[pid].option.ryads.password, sizeof(config_config.processes[pid].option.ryads.password), "%s", "admin");
|
||||||
}
|
}
|
||||||
|
@ -883,8 +883,8 @@ BOOLEAN CHostADSBFProcess::OnPreCreate(int id)
|
|||||||
//目标端口
|
//目标端口
|
||||||
m_remotePort = m_nOptions.net.target_port;
|
m_remotePort = m_nOptions.net.target_port;
|
||||||
|
|
||||||
m_user = std::string(m_nOptions.user);
|
m_adsUser = std::string(m_nOptions.user);
|
||||||
m_password = std::string(m_nOptions.password);
|
m_adsPassword = std::string(m_nOptions.password);
|
||||||
|
|
||||||
m_bHaveFTP = m_nOptions.bHaveFTP;
|
m_bHaveFTP = m_nOptions.bHaveFTP;
|
||||||
calc();
|
calc();
|
||||||
@ -977,8 +977,8 @@ BOOLEAN CHostADSBFProcess::OnTimer(void)
|
|||||||
//先添加一条路由
|
//先添加一条路由
|
||||||
if (m_bRouteAdded == FALSE)
|
if (m_bRouteAdded == FALSE)
|
||||||
{
|
{
|
||||||
long ret = AddRemoteRoute(m_remoteIp, AmsNetId(m_localNetId), m_localIp, std::string("isoftstone"), m_user, m_password);
|
long ret = AddRemoteRoute(m_remoteIp, AmsNetId(m_localNetId), m_localIp, std::string("isoftstone"), m_adsUser, m_adsPassword);
|
||||||
vLog(LOG_DEBUG, "%s add route(%s to %s) return value is: %d\n", m_pidName.c_str(), m_localIp.c_str(), m_remoteIp.c_str(), ret);
|
vLog(LOG_DEBUG, "%s add route(%s to %s) with remote user name: %s, and remote password: %s, return value is: %d\n", m_pidName.c_str(), m_localIp.c_str(), m_remoteIp.c_str(), m_adsUser.c_str(), m_adsPassword.c_str(), ret);
|
||||||
if (ret != 0) return TRUE;
|
if (ret != 0) return TRUE;
|
||||||
}
|
}
|
||||||
m_bRouteAdded = TRUE;
|
m_bRouteAdded = TRUE;
|
||||||
|
@ -43,8 +43,8 @@ private:
|
|||||||
std::string m_localNetId; //本机IP地址
|
std::string m_localNetId; //本机IP地址
|
||||||
std::string m_remoteIp; //PLC设备ip地址
|
std::string m_remoteIp; //PLC设备ip地址
|
||||||
std::string m_remoteNetId;
|
std::string m_remoteNetId;
|
||||||
std::string m_user;
|
std::string m_adsUser;
|
||||||
std::string m_password;
|
std::string m_adsPassword;
|
||||||
|
|
||||||
AdsDevice *m_turbine;
|
AdsDevice *m_turbine;
|
||||||
BOOLEAN m_bRouteAdded; //路由是否添加成功
|
BOOLEAN m_bRouteAdded; //路由是否添加成功
|
||||||
|
Loading…
Reference in New Issue
Block a user