git.netxms.org
/
public
/
netxms.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
806d780
)
Fixed bug in saving common agent policy properties to DB
author
Eriks Jenkevics
<eriks@netxms.org>
Tue, 17 Oct 2017 13:17:57 +0000
(16:17 +0300)
committer
Eriks Jenkevics
<eriks@netxms.org>
Tue, 17 Oct 2017 13:17:57 +0000
(16:17 +0300)
src/server/core/agent_policy.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/server/core/agent_policy.cpp
b/src/server/core/agent_policy.cpp
index
9745acb
..
e4e749f
100644
(file)
--- a/
src/server/core/agent_policy.cpp
+++ b/
src/server/core/agent_policy.cpp
@@
-66,7
+66,7
@@
bool AgentPolicy::savePolicyCommonProperties(DB_HANDLE hdb)
return false;
DB_STATEMENT hStmt;
return false;
DB_STATEMENT hStmt;
- if (IsDatabaseRecordExist(hdb, _T("ap_common"), _T("id"), m_id))
+ if (
!
IsDatabaseRecordExist(hdb, _T("ap_common"), _T("id"), m_id))
hStmt = DBPrepare(hdb, _T("INSERT INTO ap_common (policy_type,version,id) VALUES (?,?,?)"));
else
hStmt = DBPrepare(hdb, _T("UPDATE ap_common SET policy_type=?,version=? WHERE id=?"));
hStmt = DBPrepare(hdb, _T("INSERT INTO ap_common (policy_type,version,id) VALUES (?,?,?)"));
else
hStmt = DBPrepare(hdb, _T("UPDATE ap_common SET policy_type=?,version=? WHERE id=?"));