[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v5 3/5] hyperv: add hypervInvokeMethod



2017-06-12 22:13 GMT+02:00 Sri Ramanujam <sramanujam datto com>:
> This commit adds support for invoking methods on remote objects
> via hypervInvokeMethod.
> ---
>  src/hyperv/hyperv_wmi.c | 591 ++++++++++++++++++++++++++++++++++++++++++++++++
>  src/hyperv/hyperv_wmi.h |   8 +-
>  src/hyperv/openwsman.h  |   4 +
>  3 files changed, 601 insertions(+), 2 deletions(-)
>
> diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c
> index 2732db3..3b65f60 100644
> --- a/src/hyperv/hyperv_wmi.c
> +++ b/src/hyperv/hyperv_wmi.c

> @@ -34,11 +35,16 @@
>  #include "hyperv_private.h"
>  #include "hyperv_wmi.h"
>  #include "virstring.h"
> +#include "openwsman.h"
> +#include "virlog.h"
>
>  #define WS_SERIALIZER_FREE_MEM_WORKS 0
>
>  #define VIR_FROM_THIS VIR_FROM_HYPERV
>
> +#define HYPERV_JOB_TIMEOUT_MS 5000
> +
> +VIR_LOG_INIT("hyperv.hyperv_wmi");
>
>  static int
>  hypervGetWmiClassInfo(hypervPrivate *priv, hypervWmiClassInfoListPtr list,
> @@ -334,6 +340,7 @@ hypervCreateEmbeddedParam(hypervPrivate *priv, hypervWmiClassInfoListPtr info)
>      for (i = 0; typeinfo[i].name != NULL; i++) {}
>      count = i;
>
> +    count = i + 1;

This second assignment is wrong and has to be removed.

>      table = virHashCreate(count, NULL);
>      if (table == NULL)
>          goto error;


-- 
Matthias Bolte
http://photron.blogspot.com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]