Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/zabbix_server/vmware/vmware.c')
-rw-r--r--src/zabbix_server/vmware/vmware.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/zabbix_server/vmware/vmware.c b/src/zabbix_server/vmware/vmware.c
index 5c02680838f..b3e767226d9 100644
--- a/src/zabbix_server/vmware/vmware.c
+++ b/src/zabbix_server/vmware/vmware.c
@@ -83,6 +83,7 @@ extern char *CONFIG_SOURCE_IP;
#define ZBX_INIT_UPD_XML_SIZE (100 * ZBX_KIBIBYTE)
#define zbx_xml_free_doc(xdoc) if (NULL != xdoc)\
xmlFreeDoc(xdoc)
+#define ZBX_VMWARE_DS_REFRESH_VERSION 6
static zbx_mutex_t vmware_lock = ZBX_MUTEX_NULL;
@@ -2416,7 +2417,7 @@ static int vmware_service_refresh_datastore_info(CURL *easyhandle, const char *i
# define ZBX_POST_REFRESH_DATASTORE \
ZBX_POST_VSPHERE_HEADER \
"<ns0:RefreshDatastoreStorageInfo>" \
- "<ns0:_this type=\"HostSystem\">%s</ns0:_this>" \
+ "<ns0:_this type=\"Datastore\">%s</ns0:_this>" \
"</ns0:RefreshDatastoreStorageInfo>" \
ZBX_POST_VSPHERE_FOOTER
@@ -2480,8 +2481,9 @@ static zbx_vmware_datastore_t *vmware_service_create_datastore(const zbx_vmware_
id_esc = xml_escape_dyn(id);
- if (ZBX_VMWARE_TYPE_VSPHERE == service->type
- && SUCCEED != vmware_service_refresh_datastore_info(easyhandle, id_esc, &error))
+ if (ZBX_VMWARE_TYPE_VSPHERE == service->type &&
+ NULL != service->version && ZBX_VMWARE_DS_REFRESH_VERSION > atoi(service->version) &&
+ SUCCEED != vmware_service_refresh_datastore_info(easyhandle, id_esc, &error))
{
zbx_free(id_esc);
goto out;