Thanks for reviewing the patch Matthias!
-----Original Message-----
From: Matthias Bolte [mailto:matthias.bolte@googlemail.com]
Sent: Saturday, July 21, 2012 2:39 PM
To: Ata E Husain Bohra
Cc: libvirt-list(a)redhat.com
Subject: Re: [libvirt] [Libvirt][PATCH] ESX: Fix ESX_VI__TEMPLATE__DYNAMIC_DEEP_COPY
2012/7/19 Ata E Husain Bohra <ata.husain(a)hotmail.com>:
Fix addresses two issues:
1. Fix generator code to allow deep copy operation for objects with
Dynamic_Cast capabilities.
2. Add missing deep copy routine to Long datatype.
Signed-off-by: Ata E Husain Bohra <ata.husain(a)hotmail.com>
True, deep copy + dynamic dispatch is broken. This combination wasn't tested as no VI
type used it until now.
index 844fb65..8211c93 100644
--- a/src/esx/esx_vi_types.c
+++ b/src/esx/esx_vi_types.c
@@ -549,6 +549,21 @@
}
+#define ESX_VI__TEMPLATE__DEEPCOPY_DISPATCH(_actual_type, __type, _dispatch, \
+ _error_return) \
+ switch (_actual_type) { \
+ _dispatch \
+ \
+ case esxVI_Type_##__type: \
+ break; \
+ \
+ default: \
+ ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, \
+ _("Call to %s for unexpected type '%s'"),
__FUNCTION__, \
+ esxVI_Type_ToString(_actual_type)); \
+ return _error_return; \
+ }
+
No need for this extra copy of the ESX_VI__TEMPLATE__DISPATCH macro, I'll remove it
before pushing.
ACK and pushed, thanks.
--
Matthias Bolte
http://photron.blogspot.com