implemented map conversion to new format; removed some unused code
authorVictor Kirhenshtein <victor@netxms.org>
Thu, 5 May 2011 20:54:20 +0000 (20:54 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Thu, 5 May 2011 20:54:20 +0000 (20:54 +0000)
17 files changed:
doc/internal/db_format_change.txt
include/netxmsdb.h
include/nms_cscp.h
netxms.sln
sql/schema.in
src/java/netxms-base/src/main/java/org/netxms/base/NXCPCodes.java
src/java/netxms-eclipse/NetworkMaps/src/org/netxms/ui/eclipse/networkmaps/views/PredefinedMap.java
src/server/core/Makefile.am
src/server/core/nxcore.vcproj
src/server/core/session.cpp
src/server/core/webmaps.cpp [deleted file]
src/server/include/nms_core.h
src/server/tools/nxdbmgr/Makefile.am
src/server/tools/nxdbmgr/init.cpp
src/server/tools/nxdbmgr/mm.cpp
src/server/tools/nxdbmgr/nxdbmgr.vcproj
src/server/tools/nxdbmgr/upgrade.cpp

index 06dc1d9..6bbb842 100644 (file)
@@ -1,4 +1,12 @@
 ***************
+* 226 ==> 227 *
+***************
+
+- Maps from 1.0.x converted into network map objects
+- Table "web_maps" deleted
+
+
+***************
 * 225 ==> 226 *
 ***************
 
index b969172..77a579d 100644 (file)
@@ -23,6 +23,6 @@
 #ifndef _netxmsdb_h
 #define _netxmsdb_h
 
-#define DB_FORMAT_VERSION   227
+#define DB_FORMAT_VERSION   228
 
 #endif
index 5743f5a..e27b027 100644 (file)
@@ -438,12 +438,12 @@ typedef struct
 #define CMD_SITUATION_DATA          0x00D8
 #define CMD_SITUATION_CHANGE        0x00D9
 #define CMD_CREATE_MAP              0x00DA
-#define CMD_WEBMAP_ADD              0x00DB
-#define CMD_WEBMAP_UPDATE_PROPS     0x00DC
-#define CMD_WEBMAP_UPDATE_DATA      0x00DD
-#define CMD_WEBMAP_DELETE           0x00DE
-#define CMD_WEBMAP_GET_DATA         0x00DF
-#define CMD_WEBMAP_GET_LIST         0x00E0
+//#define CMD_WEBMAP_ADD              0x00DB
+//#define CMD_WEBMAP_UPDATE_PROPS     0x00DC
+//#define CMD_WEBMAP_UPDATE_DATA      0x00DD
+//#define CMD_WEBMAP_DELETE           0x00DE
+//#define CMD_WEBMAP_GET_DATA         0x00DF
+//#define CMD_WEBMAP_GET_LIST         0x00E0
 #define CMD_CONFIG_SET_CLOB         0x00E1
 #define CMD_CONFIG_GET_CLOB         0x00E2
 #define CMD_RENAME_MAP              0x00E3
@@ -1000,8 +1000,6 @@ typedef struct
 #define VID_OBJECT_LINKS_BASE                  ((DWORD)0x10000000)
 #define VID_SUBMAP_LINK_NAMES_BASE  ((DWORD)0x20000000)
 
-#define VID_WEBMAP_LIST_BASE        ((DWORD)0x30000000)
-
 #define VID_TABLE_COLUMN_INFO_BASE  ((DWORD)0x10000000)
 #define VID_TABLE_DATA_BASE         ((DWORD)0x20000000)
 
index 48a23b8..97987a6 100644 (file)
@@ -5,27 +5,27 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libexpat", "src\libexpat\li
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnetxms", "src\libnetxms\libnetxms.vcproj", "{B1745870-F3ED-4ACB-B813-0C4F47EF0793}"
        ProjectSection(ProjectDependencies) = postProject
-               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
                {6A88EF62-C4F2-4295-A833-549DAE4DF5ED} = {6A88EF62-C4F2-4295-A833-549DAE4DF5ED}
+               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnetxmsw", "src\libnetxms\libnetxmsw.vcproj", "{AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}"
        ProjectSection(ProjectDependencies) = postProject
-               {6A88EF62-C4F2-4295-A833-549DAE4DF5ED} = {6A88EF62-C4F2-4295-A833-549DAE4DF5ED}
                {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
+               {6A88EF62-C4F2-4295-A833-549DAE4DF5ED} = {6A88EF62-C4F2-4295-A833-549DAE4DF5ED}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxlp", "src\libnxlp\libnxlp.vcproj", "{64EFC0C2-C67B-41F6-851D-F11DAB27A60B}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
-               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
                {6A88EF62-C4F2-4295-A833-549DAE4DF5ED} = {6A88EF62-C4F2-4295-A833-549DAE4DF5ED}
+               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxagentd", "src\agent\core\nxagentd.vcproj", "{57598B02-3295-4FE8-9322-94CE871CC84D}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {F3E29541-3A0E-45EC-8BEC-E193F2401622} = {F3E29541-3A0E-45EC-8BEC-E193F2401622}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "subagents", "subagents", "{451F583D-C2DB-4414-870C-7FA0189BE7DD}"
@@ -65,8 +65,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sms", "src\agent\subagents\
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portcheck", "src\agent\subagents\portcheck\portcheck.vcproj", "{F66A27F0-2943-4A16-ACC7-B450314B5163}"
        ProjectSection(ProjectDependencies) = postProject
-               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ping", "src\agent\subagents\ping\ping.vcproj", "{C5CCF5DE-152E-40F3-AC6C-C5E54BB7C45F}"
@@ -81,8 +81,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "odbcquery", "src\agent\suba
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "logwatch", "src\agent\subagents\logwatch\logwatch.vcproj", "{F8A8749E-E539-4A3B-A21C-2C5C86AE33EA}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {64EFC0C2-C67B-41F6-851D-F11DAB27A60B} = {64EFC0C2-C67B-41F6-851D-F11DAB27A60B}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ecs", "src\agent\subagents\ecs\ecs.vcproj", "{BBE9028E-725C-45C6-97C9-BFC443F19DB6}"
@@ -104,125 +104,125 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxmapw", "src\libnxmap\l
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxcl", "src\libnxcl\libnxcl.vcproj", "{3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}"
        ProjectSection(ProjectDependencies) = postProject
-               {AB386821-B630-49F5-95C3-677B9DCE1270} = {AB386821-B630-49F5-95C3-677B9DCE1270}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {AB386821-B630-49F5-95C3-677B9DCE1270} = {AB386821-B630-49F5-95C3-677B9DCE1270}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxclw", "src\libnxcl\libnxclw.vcproj", "{3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{39BF23C9-D903-4C20-8E88-19533A745625}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxalarm", "src\client\nxalarm\nxalarm.vcproj", "{F9FFAAE9-D669-451E-B9EF-18BC8AD37FAB}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxevent", "src\client\nxevent\nxevent.vcproj", "{C7A460E8-12A8-4FC7-9F59-C9C5CE17ED20}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxpush", "src\client\nxpush\nxpush.vcproj", "{B8671BF7-94E1-4615-A8C2-F5C78DB8C515}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxsms", "src\client\nxsms\nxsms.vcproj", "{B0A70A32-A8F0-4071-8044-FDA3C834A5C5}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxsnmp", "src\snmp\libnxsnmp\libnxsnmp.vcproj", "{7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {E7410EB4-3355-4C83-8E05-D2877581CDA1} = {E7410EB4-3355-4C83-8E05-D2877581CDA1}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxzlib", "src\zlib\nxzlib.vcproj", "{E7410EB4-3355-4C83-8E05-D2877581CDA1}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxsnmpget", "src\snmp\nxsnmpget\nxsnmpget.vcproj", "{0A4CE471-020A-42C6-91C0-DFEFA7E815E0}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxsnmpw", "src\snmp\libnxsnmp\libnxsnmpw.vcproj", "{7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}"
        ProjectSection(ProjectDependencies) = postProject
-               {E7410EB4-3355-4C83-8E05-D2877581CDA1} = {E7410EB4-3355-4C83-8E05-D2877581CDA1}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {E7410EB4-3355-4C83-8E05-D2877581CDA1} = {E7410EB4-3355-4C83-8E05-D2877581CDA1}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxsnmpset", "src\snmp\nxsnmpset\nxsnmpset.vcproj", "{9EA98E79-EB7D-4F6C-8105-AC7B231ABB10}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxsnmpwalk", "src\snmp\nxsnmpwalk\nxsnmpwalk.vcproj", "{5FA3AADC-3AD7-4B17-A581-D5E02DE17727}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxmibc", "src\snmp\nxmibc\nxmibc.vcproj", "{9F722C62-78FD-4D8C-A7C7-2815B09F1943}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxsrv", "src\server\libnxsrv\libnxsrv.vcproj", "{CB89D905-C8BE-4027-B2D8-F96C245E9160}"
        ProjectSection(ProjectDependencies) = postProject
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxcore", "src\server\core\nxcore.vcproj", "{3B172035-5EEC-45A3-8471-2C390B7ED683}"
        ProjectSection(ProjectDependencies) = postProject
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
-               {64EFC0C2-C67B-41F6-851D-F11DAB27A60B} = {64EFC0C2-C67B-41F6-851D-F11DAB27A60B}
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC} = {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC}
-               {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
-               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
                {B2988503-1921-4B9F-BBC1-5E5CF62F335E} = {B2988503-1921-4B9F-BBC1-5E5CF62F335E}
+               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
+               {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC} = {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {64EFC0C2-C67B-41F6-851D-F11DAB27A60B} = {64EFC0C2-C67B-41F6-851D-F11DAB27A60B}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nxsl", "nxsl", "{CE0DA89E-CF0C-452C-9C33-75A143355BDC}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxsl", "src\libnxsl\libnxsl.vcproj", "{B2988503-1921-4B9F-BBC1-5E5CF62F335E}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxscript", "src\nxscript\nxscript.vcproj", "{BA263F92-D5A9-4F26-9606-5A1C1495FEA5}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {B2988503-1921-4B9F-BBC1-5E5CF62F335E} = {B2988503-1921-4B9F-BBC1-5E5CF62F335E}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netxmsd", "src\server\netxmsd\netxmsd.vcproj", "{E417A0C4-41F1-4F87-8C33-8526ECB1F8AF}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
                {3B172035-5EEC-45A3-8471-2C390B7ED683} = {3B172035-5EEC-45A3-8471-2C390B7ED683}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{64482674-7B36-4A14-A612-247333174315}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxaction", "src\server\tools\nxaction\nxaction.vcproj", "{BF5CE6BA-C84A-4448-B1B7-1B355AC77D12}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxadm", "src\server\tools\nxadm\nxadm.vcproj", "{67E35735-2115-45FF-9E93-EE67AF5C9C2C}"
@@ -232,31 +232,32 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxadm", "src\server\tools\n
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxget", "src\server\tools\nxget\nxget.vcproj", "{1AC3C8D1-E309-4327-9E17-0E4CE0FC68CF}"
        ProjectSection(ProjectDependencies) = postProject
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxupload", "src\server\tools\nxupload\nxupload.vcproj", "{DA863269-ED58-4910-AA6A-2572A3EE745D}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxdbmgr", "src\server\tools\nxdbmgr\nxdbmgr.vcproj", "{4940613E-A11C-4259-95C8-8D23217EE60E}"
        ProjectSection(ProjectDependencies) = postProject
                {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC} = {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC}
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {87CAA25D-991E-45E1-BB69-337D45121F19} = {87CAA25D-991E-45E1-BB69-337D45121F19}
+               {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {87CAA25D-991E-45E1-BB69-337D45121F19} = {87CAA25D-991E-45E1-BB69-337D45121F19}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "webui", "webui", "{7C6B32C4-53F9-4378-903E-1DA05748376B}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxhttpd", "src\webui\nxhttpd\nxhttpd.vcproj", "{AC0CB89C-E27A-43FA-A049-1FF4B2FE2121}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
                {F5287CFB-0894-4169-B5B5-1AEE4F2FF585} = {F5287CFB-0894-4169-B5B5-1AEE4F2FF585}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "src\webui\libgd\libpng\libpng.vcproj", "{E9F4A68D-4BF2-45AD-BDD6-210AFF857661}"
@@ -272,67 +273,67 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "smsdrv", "smsdrv", "{5818CC
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generic", "src\server\smsdrv\generic\generic.vcproj", "{41A5009F-4467-4D89-A171-5A919FEFE16E}"
        ProjectSection(ProjectDependencies) = postProject
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxagent", "src\server\smsdrv\nxagent\nxagent.vcproj", "{C317231C-B984-4423-ACF2-C19DE8B6AA3F}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgd", "src\webui\libgd\gd\libgd.vcproj", "{F5287CFB-0894-4169-B5B5-1AEE4F2FF585}"
        ProjectSection(ProjectDependencies) = postProject
-               {55B7161B-683F-4E7A-96F6-277A1681D6C5} = {55B7161B-683F-4E7A-96F6-277A1681D6C5}
-               {E9F4A68D-4BF2-45AD-BDD6-210AFF857661} = {E9F4A68D-4BF2-45AD-BDD6-210AFF857661}
-               {E7410EB4-3355-4C83-8E05-D2877581CDA1} = {E7410EB4-3355-4C83-8E05-D2877581CDA1}
                {0D98A1CD-48E0-4F11-9151-B53497E1F7DA} = {0D98A1CD-48E0-4F11-9151-B53497E1F7DA}
+               {E7410EB4-3355-4C83-8E05-D2877581CDA1} = {E7410EB4-3355-4C83-8E05-D2877581CDA1}
+               {E9F4A68D-4BF2-45AD-BDD6-210AFF857661} = {E9F4A68D-4BF2-45AD-BDD6-210AFF857661}
+               {55B7161B-683F-4E7A-96F6-277A1681D6C5} = {55B7161B-683F-4E7A-96F6-277A1681D6C5}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows", "windows", "{69EC5B74-D466-422E-B8D1-1386B0421D54}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxlexer", "src\client\nxlexer\nxlexer.vcproj", "{F0FAC738-1BC6-46A5-A54A-8D7F2219302D}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {8E5A517B-93AB-4EA8-BB53-AE6346756343} = {8E5A517B-93AB-4EA8-BB53-AE6346756343}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scilexer", "src\client\scilexer\scilexer.vcproj", "{8E5A517B-93AB-4EA8-BB53-AE6346756343}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxuilib", "src\client\windows\nxuilib\nxuilib.vcproj", "{BECC966D-AFC8-48F6-97B1-2FE92062D7B4}"
        ProjectSection(ProjectDependencies) = postProject
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxav", "src\client\windows\nxav\nxav.vcproj", "{23F22F68-D562-4E80-8267-9F1DD9398357}"
        ProjectSection(ProjectDependencies) = postProject
-               {BECC966D-AFC8-48F6-97B1-2FE92062D7B4} = {BECC966D-AFC8-48F6-97B1-2FE92062D7B4}
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
+               {BECC966D-AFC8-48F6-97B1-2FE92062D7B4} = {BECC966D-AFC8-48F6-97B1-2FE92062D7B4}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxnotify", "src\client\windows\nxnotify\nxnotify.vcproj", "{169A4446-A035-4CF7-8377-3C517ADF0C50}"
        ProjectSection(ProjectDependencies) = postProject
-               {BECC966D-AFC8-48F6-97B1-2FE92062D7B4} = {BECC966D-AFC8-48F6-97B1-2FE92062D7B4}
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
+               {BECC966D-AFC8-48F6-97B1-2FE92062D7B4} = {BECC966D-AFC8-48F6-97B1-2FE92062D7B4}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxcon", "src\client\windows\nxcon\nxcon.vcproj", "{956DD617-0939-4B25-B8D0-E10AA645064E}"
        ProjectSection(ProjectDependencies) = postProject
-               {BECC966D-AFC8-48F6-97B1-2FE92062D7B4} = {BECC966D-AFC8-48F6-97B1-2FE92062D7B4}
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
+               {BECC966D-AFC8-48F6-97B1-2FE92062D7B4} = {BECC966D-AFC8-48F6-97B1-2FE92062D7B4}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxlptest", "src\nxlptest\nxlptest.vcproj", "{1EA79FC6-F395-43DF-9E3C-2030CA05ED1D}"
        ProjectSection(ProjectDependencies) = postProject
-               {64EFC0C2-C67B-41F6-851D-F11DAB27A60B} = {64EFC0C2-C67B-41F6-851D-F11DAB27A60B}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {64EFC0C2-C67B-41F6-851D-F11DAB27A60B} = {64EFC0C2-C67B-41F6-851D-F11DAB27A60B}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxsqlite", "src\sqlite\nxsqlite.vcproj", "{87CAA25D-991E-45E1-BB69-337D45121F19}"
@@ -383,14 +384,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pgsql", "src\db\dbdrv\pgsql
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite", "src\db\dbdrv\sqlite\sqlite.vcproj", "{AA18FD4D-7B01-4932-BA04-B0F54F001F66}"
        ProjectSection(ProjectDependencies) = postProject
-               {87CAA25D-991E-45E1-BB69-337D45121F19} = {87CAA25D-991E-45E1-BB69-337D45121F19}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {87CAA25D-991E-45E1-BB69-337D45121F19} = {87CAA25D-991E-45E1-BB69-337D45121F19}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxconfig", "src\server\tools\nxconfig\nxconfig.vcproj", "{A76CCCF5-D70B-4307-B84C-219289CEAA6D}"
        ProjectSection(ProjectDependencies) = postProject
-               {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC} = {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC} = {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxcptest", "src\tools\nxcptest\nxcptest.vcproj", "{418E47B0-3E78-4820-A101-CA9C4439F9AB}"
@@ -407,9 +408,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libipfix", "src\flow_analyz
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxflowd", "src\flow_analyzer\nxflowd\nxflowd.vcproj", "{D7F709ED-7483-49F0-8B17-ABB705606FEA}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
-               {F3E29541-3A0E-45EC-8BEC-E193F2401622} = {F3E29541-3A0E-45EC-8BEC-E193F2401622}
                {2DEF303B-5FEF-4F5E-87C4-FB7895058F59} = {2DEF303B-5FEF-4F5E-87C4-FB7895058F59}
+               {F3E29541-3A0E-45EC-8BEC-E193F2401622} = {F3E29541-3A0E-45EC-8BEC-E193F2401622}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "db2", "src\db\dbdrv\db2\db2.vcproj", "{297D9A45-B928-4470-91B5-0E07A20C2405}"
@@ -419,8 +420,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "db2", "src\db\dbdrv\db2\db2
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxap", "src\server\tools\nxap\nxap.vcproj", "{36749C31-C8C6-4DD2-A11C-E41ED86927C7}"
        ProjectSection(ProjectDependencies) = postProject
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtre", "src\libtre\libtre.vcproj", "{406AE5C7-343D-4C88-B8F3-84E46255B830}"
@@ -439,42 +440,42 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "drivers", "drivers", "{5399
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "baystack", "src\server\drivers\baystack\baystack.vcproj", "{13A91F2E-A17B-4ABA-B5B2-285807BD7832}"
        ProjectSection(ProjectDependencies) = postProject
-               {DA651576-4E4F-448C-A0A3-9EDD15C81078} = {DA651576-4E4F-448C-A0A3-9EDD15C81078}
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {DA651576-4E4F-448C-A0A3-9EDD15C81078} = {DA651576-4E4F-448C-A0A3-9EDD15C81078}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ers8000", "src\server\drivers\ers8000\ers8000.vcproj", "{076E6815-4B6B-4F1E-A36C-CD3DD26EA5AC}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
                {DA651576-4E4F-448C-A0A3-9EDD15C81078} = {DA651576-4E4F-448C-A0A3-9EDD15C81078}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{D73BB67D-032B-4FB7-AEB8-5795B246A072}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avaya-ers", "src\server\drivers\lib\avaya-ers\avaya-ers.vcproj", "{DA651576-4E4F-448C-A0A3-9EDD15C81078}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cisco", "src\server\drivers\lib\cisco\cisco.vcproj", "{375F95BD-EFBA-4AA3-8DA3-E79779A12896}"
        ProjectSection(ProjectDependencies) = postProject
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cat2900xl", "src\server\drivers\cat2900xl\cat2900xl.vcproj", "{FEEF505B-75AE-4E52-8177-51FFC4AB2ED2}"
        ProjectSection(ProjectDependencies) = postProject
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {375F95BD-EFBA-4AA3-8DA3-E79779A12896} = {375F95BD-EFBA-4AA3-8DA3-E79779A12896}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
        EndProjectSection
 EndProject
 Global
index f96bb91..14c6916 100644 (file)
@@ -1152,21 +1152,6 @@ CREATE TABLE snmp_communities
 
 
 /*
-** Maps for XULRunner client and web clients
-*/
-
-CREATE TABLE web_maps
-(
-       id integer not null,
-       title varchar(63) not null,
-       properties SQL_TEXT not null,
-       data SQL_TEXT not null,
-       PRIMARY KEY(id)
-) TABLE_TYPE;
-
-
-
-/*
 ** Agent policies - common attributes
 */
 
index 96a3489..2bb291f 100644 (file)
@@ -246,12 +246,12 @@ public final class NXCPCodes
        public static final int CMD_SITUATION_DATA          = 0x00D8;\r
        public static final int CMD_SITUATION_CHANGE        = 0x00D9;\r
        public static final int CMD_CREATE_MAP              = 0x00DA;\r
-       public static final int CMD_WEBMAP_ADD              = 0x00DB;\r
-       public static final int CMD_WEBMAP_UPDATE_PROPS     = 0x00DC;\r
-       public static final int CMD_WEBMAP_UPDATE_DATA      = 0x00DD;\r
-       public static final int CMD_WEBMAP_DELETE           = 0x00DE;\r
-       public static final int CMD_WEBMAP_GET_DATA         = 0x00DF;\r
-       public static final int CMD_WEBMAP_GET_LIST         = 0x00E0;\r
+       //public static final int CMD_WEBMAP_ADD              = 0x00DB;\r
+       //public static final int CMD_WEBMAP_UPDATE_PROPS     = 0x00DC;\r
+       //public static final int CMD_WEBMAP_UPDATE_DATA      = 0x00DD;\r
+       //public static final int CMD_WEBMAP_DELETE           = 0x00DE;\r
+       //public static final int CMD_WEBMAP_GET_DATA         = 0x00DF;\r
+       //public static final int CMD_WEBMAP_GET_LIST         = 0x00E0;\r
        public static final int CMD_CONFIG_SET_CLOB         = 0x00E1;\r
        public static final int CMD_CONFIG_GET_CLOB         = 0x00E2;\r
        public static final int CMD_RENAME_MAP              = 0x00E3;\r
@@ -731,7 +731,6 @@ public final class NXCPCodes
        public static final long VID_INSTANCE_LIST_BASE       = 0x20000000L;\r
        public static final long VID_OBJECT_LINKS_BASE        = 0x10000000L;\r
        public static final long VID_SUBMAP_LINK_NAMES_BASE   = 0x20000000L;\r
-       public static final long VID_WEBMAP_LIST_BASE         = 0x30000000L;\r
        public static final long VID_JOB_LIST_BASE            = 0x10000000L;\r
        public static final long VID_TABLE_COLUMN_INFO_BASE   = 0x10000000L;\r
        public static final long VID_TABLE_DATA_BASE          = 0x20000000L;\r
index 2513a58..e94c074 100644 (file)
@@ -47,6 +47,7 @@ import org.eclipse.ui.IViewSite;
 import org.eclipse.ui.PartInitException;\r
 import org.eclipse.ui.PlatformUI;\r
 import org.eclipse.ui.progress.UIJob;\r
+import org.netxms.base.NXCommon;\r
 import org.netxms.client.NXCObjectModificationData;\r
 import org.netxms.client.maps.NetworkMapLink;\r
 import org.netxms.client.maps.elements.NetworkMapDecoration;\r
@@ -142,7 +143,7 @@ public class PredefinedMap extends NetworkMap implements ImageUpdateListener
                        \r
                ImageProvider.getInstance().addUpdateListener(this);\r
                \r
-               if (mapObject.getBackground() != null)\r
+               if ((mapObject.getBackground() != null) && (mapObject.getBackground().compareTo(NXCommon.EMPTY_GUID) != 0))\r
                        viewer.setBackgroundImage(ImageProvider.getInstance().getImage(mapObject.getBackground()));\r
        }\r
 \r
index 1012216..ac18693 100644 (file)
@@ -22,7 +22,7 @@ libnxcore_la_SOURCES = acl.cpp agent.cpp agent_policy.cpp actions.cpp \
                        subnet.cpp syncer.cpp syslogd.cpp template.cpp \
                        tools.cpp tracert.cpp uniroot.cpp upload_job.cpp \
                        userdb.cpp userdb_objects.cpp vpnconn.cpp \
-                       vrrp.cpp watchdog.cpp webmaps.cpp zone.cpp
+                       vrrp.cpp watchdog.cpp zone.cpp
 libnxcore_la_LDFLAGS = -version-info $(NETXMS_LIBRARY_VERSION)
 libnxcore_la_LIBADD = ../../libnetxms/libnetxms.la \
                      ../../snmp/libnxsnmp/libnxsnmp.la \
index f8c550b..14876aa 100644 (file)
                                >\r
                        </File>\r
                        <File\r
-                               RelativePath=".\webmaps.cpp"\r
-                               >\r
-                       </File>\r
-                       <File\r
                                RelativePath=".\zone.cpp"\r
                                >\r
                        </File>\r
index a94d73d..7997dbe 100644 (file)
@@ -1164,24 +1164,6 @@ void ClientSession::processingThread()
                        case CMD_DEL_SITUATION_INSTANCE:
                                DeleteSituationInstance(pMsg);
                                break;
-                       case CMD_WEBMAP_ADD:
-                               WebMapAdd(pMsg);
-                               break;
-                       case CMD_WEBMAP_UPDATE_PROPS:
-                               WebMapUpdateProps(pMsg);
-                               break;
-                       case CMD_WEBMAP_UPDATE_DATA:
-                               WebMapUpdateData(pMsg);
-                               break;
-                       case CMD_WEBMAP_DELETE:
-                               WebMapDelete(pMsg);
-                               break;
-                       case CMD_WEBMAP_GET_DATA:
-                               WebMapGetData(pMsg);
-                               break;
-                       case CMD_WEBMAP_GET_LIST:
-                               WebMapGetList(pMsg->GetId());
-                               break;
                        case CMD_REGISTER_AGENT:
                                registerAgent(pMsg);
                                break;
@@ -9994,219 +9976,6 @@ void ClientSession::onSituationChange(CSCPMessage *msg)
 
 
 //
-// Add new webmap
-//
-
-void ClientSession::WebMapAdd(CSCPMessage *pRequest)
-{
-   CSCPMessage msg;
-   TCHAR name[64], *props;
-   DWORD mapId, rcc;
-
-   msg.SetCode(CMD_REQUEST_COMPLETED);
-   msg.SetId(pRequest->GetId());
-
-       if (m_dwSystemAccess & SYSTEM_ACCESS_MANAGE_MAPS)
-       {
-               pRequest->GetVariableStr(VID_NAME, name, 64);
-               if (IsValidObjectName(name, TRUE))
-               {
-                       props = pRequest->GetVariableStr(VID_PROPERTIES);
-                       rcc = CreateWebMap(name, props, &mapId);
-                       msg.SetVariable(VID_RCC, rcc);
-                       if (rcc == RCC_SUCCESS)
-                               msg.SetVariable(VID_MAP_ID, mapId);
-                       safe_free(props);
-               }
-               else
-               {
-             msg.SetVariable(VID_RCC, RCC_INVALID_OBJECT_NAME);
-               }
-       }
-       else
-       {
-      msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
-       }
-
-   sendMessage(&msg);
-}
-
-
-//
-// Update webmap data
-//
-
-void ClientSession::WebMapUpdateData(CSCPMessage *pRequest)
-{
-   CSCPMessage msg;
-   TCHAR *data;
-   DWORD mapId;
-
-   msg.SetCode(CMD_REQUEST_COMPLETED);
-   msg.SetId(pRequest->GetId());
-
-       if (m_dwSystemAccess & SYSTEM_ACCESS_MANAGE_MAPS)
-       {
-               mapId = pRequest->GetVariableLong(VID_MAP_ID);
-               data = pRequest->GetVariableStr(VID_MAP_DATA);
-          msg.SetVariable(VID_RCC, UpdateWebMapData(mapId, data));
-               free(data);
-       }
-       else
-       {
-      msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
-       }
-
-   sendMessage(&msg);
-}
-
-
-//
-// Update webmap properties
-//
-
-void ClientSession::WebMapUpdateProps(CSCPMessage *pRequest)
-{
-   CSCPMessage msg;
-   TCHAR *props, name[64];
-   DWORD mapId;
-
-   msg.SetCode(CMD_REQUEST_COMPLETED);
-   msg.SetId(pRequest->GetId());
-
-       if (m_dwSystemAccess & SYSTEM_ACCESS_MANAGE_MAPS)
-       {
-               mapId = pRequest->GetVariableLong(VID_MAP_ID);
-               props = pRequest->GetVariableStr(VID_PROPERTIES);
-               pRequest->GetVariableStr(VID_NAME, name, 64);
-          msg.SetVariable(VID_RCC, UpdateWebMapProperties(mapId, name, props));
-               free(props);
-       }
-       else
-       {
-      msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
-       }
-
-   sendMessage(&msg);
-}
-
-
-//
-// Delete webmap
-//
-
-void ClientSession::WebMapDelete(CSCPMessage *pRequest)
-{
-   CSCPMessage msg;
-
-   msg.SetCode(CMD_REQUEST_COMPLETED);
-   msg.SetId(pRequest->GetId());
-
-       if (m_dwSystemAccess & SYSTEM_ACCESS_MANAGE_MAPS)
-       {
-               msg.SetVariable(VID_RCC, DeleteWebMap(pRequest->GetVariableLong(VID_MAP_ID)));
-       }
-       else
-       {
-      msg.SetVariable(VID_RCC, RCC_ACCESS_DENIED);
-       }
-
-   sendMessage(&msg);
-}
-
-
-//
-// Get webmap's data
-//
-
-void ClientSession::WebMapGetData(CSCPMessage *pRequest)
-{
-   CSCPMessage msg;
-   DWORD mapId;
-       TCHAR *data, query[256];
-       DB_RESULT hResult;
-
-   msg.SetCode(CMD_REQUEST_COMPLETED);
-   msg.SetId(pRequest->GetId());
-
-       mapId = pRequest->GetVariableLong(VID_MAP_ID);
-       _sntprintf(query, 256, _T("SELECT data FROM web_maps WHERE id=%d"), mapId);
-       hResult = DBSelect(g_hCoreDB, query);
-       if (hResult != NULL)
-       {
-               if (DBGetNumRows(hResult) > 0)
-               {
-                       data = DBGetField(hResult, 0, 0, NULL, 0);
-                       if (data != NULL)
-                               DecodeSQLString(data);
-                       msg.SetVariable(VID_RCC, RCC_SUCCESS);
-                       msg.SetVariable(VID_MAP_DATA, CHECK_NULL_EX(data));
-                       safe_free(data);
-               }
-               else
-               {
-                       msg.SetVariable(VID_RCC, RCC_INVALID_MAP_ID);
-               }
-       }
-       else
-       {
-               msg.SetVariable(VID_RCC, RCC_DB_FAILURE);
-       }
-
-   sendMessage(&msg);
-}
-
-
-//
-// Get list of webmaps
-//
-
-void ClientSession::WebMapGetList(DWORD dwRqId)
-{
-   CSCPMessage msg;
-       DB_RESULT hResult;
-       DWORD i, id, count;
-       TCHAR name[256], *props;
-
-   msg.SetCode(CMD_REQUEST_COMPLETED);
-   msg.SetId(dwRqId);
-
-       hResult = DBSelect(g_hCoreDB, _T("SELECT id,title,properties FROM web_maps"));
-       if (hResult != NULL)
-       {
-               count = DBGetNumRows(hResult);
-               msg.SetVariable(VID_NUM_MAPS, count);
-               for(i = 0, id = VID_WEBMAP_LIST_BASE; i < count; i++)
-               {
-                       msg.SetVariable(id++, DBGetFieldULong(hResult, i, 0));
-                       DBGetField(hResult, i, 1, name, 256);
-                       msg.SetVariable(id++, name);
-                       props = DBGetField(hResult, i, 2, NULL, 0);
-                       if (props != NULL)
-                       {
-                               DecodeSQLString(props);
-                               msg.SetVariable(id++, props);
-                               free(props);
-                       }
-                       else
-                       {
-                               msg.SetVariable(id++, _T(""));
-                       }
-                       id += 7;
-               }
-               msg.SetVariable(VID_RCC, RCC_SUCCESS);
-               DBFreeResult(hResult);
-       }
-       else
-       {
-               msg.SetVariable(VID_RCC, RCC_DB_FAILURE);
-       }
-
-   sendMessage(&msg);
-}
-
-
-//
 // Register agent
 //
 
diff --git a/src/server/core/webmaps.cpp b/src/server/core/webmaps.cpp
deleted file mode 100644 (file)
index 8280b04..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/* $Id$ */
-/* 
-** NetXMS - Network Management System
-** Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Victor Kirhenshtein
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-**
-** File: webmaps.cpp
-**
-**/
-
-#include "nxcore.h"
-
-
-//
-// Check existence of webmap
-//
-
-static BOOL IsWebMapExist(DWORD id)
-{
-       TCHAR query[256];
-       DB_RESULT hResult;
-       BOOL isExist = FALSE;
-
-       _sntprintf(query, 256, _T("SELECT id FROM web_maps WHERE id=%d"), id);
-       hResult = DBSelect(g_hCoreDB, query);
-       if (hResult != NULL)
-       {
-               isExist = (DBGetNumRows(hResult) > 0);
-               DBFreeResult(hResult);
-       }
-       return isExist;
-}
-
-
-//
-// Create webmap. Returns RCC.
-//
-
-DWORD CreateWebMap(const TCHAR *name, const TCHAR *props, DWORD *id)
-{
-       TCHAR *escProps, *query;
-       size_t len;
-       DWORD mapId, rcc;
-
-       escProps = EncodeSQLString(CHECK_NULL_EX(props));
-       len = _tcslen(escProps) + 256;
-       query = (TCHAR *)malloc(len * sizeof(TCHAR));
-       mapId = CreateUniqueId(IDG_MAP);
-       _sntprintf(query, len, _T("INSERT INTO web_maps (id,title,properties,data) VALUES (%d,'%s','%s','#00')"),
-                            mapId, name, escProps);
-       free(escProps);
-       rcc = DBQuery(g_hCoreDB, query) ? RCC_SUCCESS : RCC_DB_FAILURE;
-       *id = mapId;
-       free(query);
-       return rcc;
-}
-
-
-//
-// Delete webmap. Returns RCC.
-//
-
-DWORD DeleteWebMap(DWORD id)
-{
-       DWORD rcc;
-       TCHAR query[256];
-
-       if (IsWebMapExist(id))
-       {
-               _sntprintf(query, 256, _T("DELETE FROM web_maps WHERE id=%d"), id);
-               rcc = DBQuery(g_hCoreDB, query) ? RCC_SUCCESS : RCC_DB_FAILURE;
-       }
-       else
-       {
-               rcc = RCC_INVALID_MAP_ID;
-       }
-       return rcc;
-}
-
-
-//
-// Update webmap's data. Returns RCC.
-//
-
-DWORD UpdateWebMapData(DWORD mapId, const TCHAR *data)
-{
-       DWORD rcc;
-       size_t len;
-       TCHAR *query, *escData;
-
-       if (IsWebMapExist(mapId))
-       {
-               escData = EncodeSQLString(CHECK_NULL_EX(data));
-               len = _tcslen(escData) + 256;
-               query = (TCHAR *)malloc(len * sizeof(TCHAR));
-               _sntprintf(query, len, _T("UPDATE web_maps SET data='%s' WHERE id=%d"), escData, mapId);
-               free(escData);
-               rcc = DBQuery(g_hCoreDB, query) ? RCC_SUCCESS : RCC_DB_FAILURE;
-               free(query);
-       }
-       else
-       {
-               rcc = RCC_INVALID_MAP_ID;
-       }
-       return rcc;
-}
-
-
-//
-// Update webmap's properties. Returns RCC.
-//
-
-DWORD UpdateWebMapProperties(DWORD mapId, const TCHAR *name, const TCHAR *props)
-{
-       DWORD rcc;
-       size_t len;
-       TCHAR *query, *escProps;
-
-       if (IsWebMapExist(mapId))
-       {
-               escProps = EncodeSQLString(CHECK_NULL_EX(props));
-               len = _tcslen(escProps) + 256;
-               query = (TCHAR *)malloc(len * sizeof(TCHAR));
-               _sntprintf(query, len, _T("UPDATE web_maps SET title='%s',properties='%s' WHERE id=%d"),
-                          name, escProps, mapId);
-               free(escProps);
-               rcc = DBQuery(g_hCoreDB, query) ? RCC_SUCCESS : RCC_DB_FAILURE;
-               free(query);
-       }
-       else
-       {
-               rcc = RCC_INVALID_MAP_ID;
-       }
-       return rcc;
-}
index 9654f82..fd84378 100644 (file)
@@ -544,12 +544,6 @@ private:
        void DeleteSituationInstance(CSCPMessage *pRequest);
        void setConfigCLOB(CSCPMessage *pRequest);
        void getConfigCLOB(CSCPMessage *pRequest);
-       void WebMapAdd(CSCPMessage *pRequest);
-       void WebMapUpdateData(CSCPMessage *pRequest);
-       void WebMapUpdateProps(CSCPMessage *pRequest);
-       void WebMapDelete(CSCPMessage *pRequest);
-       void WebMapGetData(CSCPMessage *pRequest);
-       void WebMapGetList(DWORD dwRqId);
        void registerAgent(CSCPMessage *pRequest);
        void getServerFile(CSCPMessage *pRequest);
        void testDCITransformation(CSCPMessage *pRequest);
index 5150267..1907916 100644 (file)
@@ -2,7 +2,7 @@ INCLUDES=-I@top_srcdir@/include -I@top_srcdir@/src/server/include -I@top_srcdir@
 
 bin_PROGRAMS = nxdbmgr
 nxdbmgr_SOURCES = nxdbmgr.cpp check.cpp clear.cpp export.cpp import.cpp \
-                  init.cpp reindex.cpp unlock.cpp upgrade.cpp
+                  init.cpp mm.cpp reindex.cpp unlock.cpp upgrade.cpp
 nxdbmgr_LDADD = ../../../libnetxms/libnetxms.la \
                 ../../../db/libnxdb/libnxdb.la \
                 ../../libnxsrv/libnxsrv.la \
index 432fbe0..717fbef 100644 (file)
@@ -1,6 +1,6 @@
 /* 
 ** nxdbmgr - NetXMS database manager
-** Copyright (C) 2004-2010 Victor Kirhenshtein
+** Copyright (C) 2004-2011 Victor Kirhenshtein
 **
 ** This program is free software; you can redistribute it and/or modify
 ** it under the terms of the GNU General Public License as published by
index 5959a0f..4320614 100644 (file)
@@ -1,3 +1,34 @@
+/* 
+** nxdbmgr - NetXMS database manager
+** Copyright (C) 2004-2011 Victor Kirhenshtein
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+** File: mm.cpp
+**
+**/
+
+#include "nxdbmgr.h"
+#include <netxms_maps.h>
+
+
+/**
+ * Generate new object ID
+ *
+ * @return new unique object ID
+ */
 static DWORD GenerateObjectId()
 {
        DB_RESULT hResult = SQLSelect(_T("SELECT max(object_id) FROM object_properties"));
@@ -9,6 +40,13 @@ static DWORD GenerateObjectId()
        return id;
 }
 
+/**
+ * Create new network map object
+ *
+ * @param name map name
+ * @param description map description (will be placed into comments)
+ * @return ID of created network map object or 0 in case of failure
+ */
 static DWORD CreateMapObject(const TCHAR *name, const TCHAR *description)
 {
        TCHAR query[4096];
@@ -17,7 +55,7 @@ static DWORD CreateMapObject(const TCHAR *name, const TCHAR *description)
        if (id == 0)
                return 0;
 
-       _sntprintf(query, 4096, _T("INSERT INTO network_maps (id,map_type,layout,seed,background) VALUES (%d,0,32767,0,'')"), (int)id);
+       _sntprintf(query, 4096, _T("INSERT INTO network_maps (id,map_type,layout,seed,background) VALUES (%d,0,32767,0,'00000000-0000-0000-0000-000000000000')"), (int)id);
        if (!SQLQuery(query))
                return FALSE;
 
@@ -35,16 +73,103 @@ static DWORD CreateMapObject(const TCHAR *name, const TCHAR *description)
               _T("(%d,'%s',%s,0,0,0,1,") TIME_T_FMT _T(",0,0,0,0,0,0,'00000000',0,")
                                  _T("'0.000000','0.000000','00000000-0000-0000-0000-000000000000',%s)"),
                                  (int)id, uuid_to_string(guid, guidText), 
-                                 DBPrepareString(g_hCoreDB, name), 
+                                 (const TCHAR *)DBPrepareString(g_hCoreDB, name), 
                                  TIME_T_FCAST(time(NULL)),
-                                 DBPrepareString(g_hCoreDB, description, 2048));
+                                 (const TCHAR *)DBPrepareString(g_hCoreDB, description, 2048));
        if (!SQLQuery(query))
                return FALSE;
 
+       _sntprintf(query, 4096, _T("INSERT INTO container_members (container_id,object_id) VALUES (6,%d)"), (int)id);
+       return SQLQuery(query) ? id : 0;
+}
 
+/**
+ * Migrate objects
+ */
+static BOOL MigrateObjects(DWORD mapId, DWORD submapId, DWORD mapObjectId)
+{
+       TCHAR query[8192];
+
+       _sntprintf(query, 8192, _T("SELECT object_id,x,y FROM submap_object_positions WHERE map_id=%d AND submap_id=%d"), (int)mapId, (int)submapId);
+       DB_RESULT hResult = SQLSelect(query);
+       if (hResult == NULL)
+               return FALSE;
+
+       BOOL success = FALSE;
+
+       int count = DBGetNumRows(hResult);
+       for(int i = 0; i < count; i++)
+       {
+               DWORD id = DBGetFieldULong(hResult, i, 0);
+
+               NetworkMapObject *object = new NetworkMapObject(id, id);
+               object->setPosition(DBGetFieldLong(hResult, i, 1), DBGetFieldLong(hResult, i, 2));
+
+               Config *config = new Config();
+               config->setTopLevelTag(_T("element"));
+               object->updateConfig(config);
+               String data = DBPrepareString(g_hCoreDB, config->createXml());
+               delete config;
+               delete object;
+
+               _sntprintf(query, 8192, _T("INSERT INTO network_map_elements (map_id,element_id,element_type,element_data) VALUES (%d,%d,1,%s)"),
+                          (int)mapObjectId, (int)id, (const TCHAR *)data);
+               if (!SQLQuery(query))
+                       goto cleanup;
+       }
+
+       success = TRUE;
+
+cleanup:
+       DBFreeResult(hResult);
+       return success;
 }
 
+/**
+ * Migrate links between objects
+ */
+static BOOL MigrateLinks(DWORD mapId, DWORD submapId, DWORD mapObjectId)
+{
+       TCHAR query[8192];
+
+       _sntprintf(query, 8192, _T("SELECT object_id1,object_id2,port1,port2,link_type FROM submap_links WHERE map_id=%d AND submap_id=%d"), (int)mapId, (int)submapId);
+       DB_RESULT hResult = SQLSelect(query);
+       if (hResult == NULL)
+               return FALSE;
+
+       BOOL success = FALSE;
+
+       int count = DBGetNumRows(hResult);
+       for(int i = 0; i < count; i++)
+       {
+               DWORD id1 = DBGetFieldULong(hResult, i, 0);
+               DWORD id2 = DBGetFieldULong(hResult, i, 1);
+               int type = (int)DBGetFieldLong(hResult, i, 4);
+
+               TCHAR cname1[256], cname2[256];
+               DBGetField(hResult, i, 2, cname1, 256);
+               DBGetField(hResult, i, 3, cname2, 256);
+               DecodeSQLString(cname1);
+               DecodeSQLString(cname2);
+
+               _sntprintf(query, 8192, _T("INSERT INTO network_map_links (map_id,element1,element2,link_type,link_name,connector_name1,connector_name2) VALUES (%d,%d,%d,%d,'',%s,%s)"),
+                          (int)mapObjectId, (int)id1, (int)id2, type, 
+                                         (const TCHAR *)DBPrepareString(g_hCoreDB, cname1),
+                                         (const TCHAR *)DBPrepareString(g_hCoreDB, cname2));
+               if (!SQLQuery(query))
+                       goto cleanup;
+       }
+
+       success = TRUE;
+
+cleanup:
+       DBFreeResult(hResult);
+       return success;
+}
 
+/**
+ * Migrate 1.0.x maps to 1.1.x network map objects
+ */
 BOOL MigrateMaps()
 {
        DB_RESULT hResult = SQLSelect(_T("SELECT map_id,map_name,description,root_object_id FROM maps"));
@@ -55,11 +180,21 @@ BOOL MigrateMaps()
        int count = DBGetNumRows(hResult);
        for(int i = 0; i < count; i++)
        {
-               TCHAR name[256];
+               TCHAR name[256], description[2048];
 
                DBGetField(hResult, i, 1, name, 256);
-               DWORD newId = CreateMapObject(name);
-               if (newId == 0)
+               DecodeSQLString(name);
+               DBGetField(hResult, i, 2, description, 2048);
+               DecodeSQLString(description);
+               DWORD mapObjectId = CreateMapObject(name, description);
+               if (mapObjectId == 0)
+                       goto cleanup;
+
+               DWORD mapId = DBGetFieldULong(hResult, i, 0);
+               DWORD submapId = DBGetFieldULong(hResult, i, 3);
+               if (!MigrateObjects(mapId, submapId,  mapObjectId))
+                       goto cleanup;
+               if (!MigrateLinks(mapId, submapId, mapObjectId))
                        goto cleanup;
        }
 
index 0d544b1..cadfc96 100644 (file)
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\..\..\..\include\netxms_maps.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\..\..\..\include\netxmsdb.h"\r
                                >\r
                        </File>\r
index 92f3c9b..fab9539 100644 (file)
 
 
 //
+// Externals
+//
+
+BOOL MigrateMaps();
+
+
+//
 // Execute with error check
 //
 
@@ -248,6 +255,18 @@ static BOOL SetColumnNullable(const TCHAR *table, const TCHAR *column, const TCH
 }
 
 
+//
+// Upgrade from V227 to V228
+//
+
+static BOOL H_UpgradeFromV227(int currVersion, int newVersion)
+{
+       CHK_EXEC(SQLQuery(_T("DROP TABLE web_maps")));
+       CHK_EXEC(MigrateMaps());
+       CHK_EXEC(SQLQuery(_T("UPDATE metadata SET var_value='228' WHERE var_name='SchemaVersion'")));
+   return TRUE;
+}
+
 
 //
 // Upgrade from V226 to V227
@@ -5201,6 +5220,7 @@ static struct
        { 224, 225, H_UpgradeFromV224 },
        { 225, 226, H_UpgradeFromV225 },
        { 226, 227, H_UpgradeFromV226 },
+       { 227, 228, H_UpgradeFromV227 },
    { 0, NULL }
 };