mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-16 03:24:31 +03:00
remote: enforce VIR_TYPED_PARAM_STRING_OKAY flag on client side serialization
Commit 8cd1d54 consolidates both daemon and remote driver typed param serialization functions. The consolidation now enforces client to use VIR_TYPED_PARAM_STRING_OKAY flag to properly serialize string parameters, which server has used for quite some time now. And this caused an issue, since the commit had not adjusted client remote calls appropriately, thus causing a failure in blkiotune, numatune and migration APIs (as per Xen CI tests). This patch adjusts both remote_driver.c and gendispatch.pl to properly address this issue. http://lists.xenproject.org/archives/html/xen-devel/2016-02/msg01012.html Signed-off-by: Joao Martins <joao.m.martins@oracle.com> Signed-off-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
a0aa92a24b
commit
d9c57ca9f9
@ -6886,7 +6886,8 @@ remoteDomainMigrateBegin3Params(virDomainPtr domain,
|
||||
|
||||
if (virTypedParamsSerialize(params, nparams,
|
||||
(virTypedParameterRemotePtr *) &args.params.params_val,
|
||||
&args.params.params_len, 0) < 0) {
|
||||
&args.params.params_len,
|
||||
VIR_TYPED_PARAM_STRING_OKAY) < 0) {
|
||||
xdr_free((xdrproc_t) xdr_remote_domain_migrate_begin3_params_args,
|
||||
(char *) &args);
|
||||
goto cleanup;
|
||||
@ -6953,7 +6954,8 @@ remoteDomainMigratePrepare3Params(virConnectPtr dconn,
|
||||
|
||||
if (virTypedParamsSerialize(params, nparams,
|
||||
(virTypedParameterRemotePtr *) &args.params.params_val,
|
||||
&args.params.params_len, 0) < 0) {
|
||||
&args.params.params_len,
|
||||
VIR_TYPED_PARAM_STRING_OKAY) < 0) {
|
||||
xdr_free((xdrproc_t) xdr_remote_domain_migrate_prepare3_params_args,
|
||||
(char *) &args);
|
||||
goto cleanup;
|
||||
@ -7040,7 +7042,8 @@ remoteDomainMigratePrepareTunnel3Params(virConnectPtr dconn,
|
||||
|
||||
if (virTypedParamsSerialize(params, nparams,
|
||||
(virTypedParameterRemotePtr *) &args.params.params_val,
|
||||
&args.params.params_len, 0) < 0) {
|
||||
&args.params.params_len,
|
||||
VIR_TYPED_PARAM_STRING_OKAY) < 0) {
|
||||
xdr_free((xdrproc_t) xdr_remote_domain_migrate_prepare_tunnel3_params_args,
|
||||
(char *) &args);
|
||||
goto cleanup;
|
||||
@ -7129,7 +7132,8 @@ remoteDomainMigratePerform3Params(virDomainPtr dom,
|
||||
|
||||
if (virTypedParamsSerialize(params, nparams,
|
||||
(virTypedParameterRemotePtr *) &args.params.params_val,
|
||||
&args.params.params_len, 0) < 0) {
|
||||
&args.params.params_len,
|
||||
VIR_TYPED_PARAM_STRING_OKAY) < 0) {
|
||||
xdr_free((xdrproc_t) xdr_remote_domain_migrate_perform3_params_args,
|
||||
(char *) &args);
|
||||
goto cleanup;
|
||||
@ -7201,7 +7205,8 @@ remoteDomainMigrateFinish3Params(virConnectPtr dconn,
|
||||
|
||||
if (virTypedParamsSerialize(params, nparams,
|
||||
(virTypedParameterRemotePtr *) &args.params.params_val,
|
||||
&args.params.params_len, 0) < 0) {
|
||||
&args.params.params_len,
|
||||
VIR_TYPED_PARAM_STRING_OKAY) < 0) {
|
||||
xdr_free((xdrproc_t) xdr_remote_domain_migrate_finish3_params_args,
|
||||
(char *) &args);
|
||||
goto cleanup;
|
||||
@ -7275,7 +7280,8 @@ remoteDomainMigrateConfirm3Params(virDomainPtr domain,
|
||||
|
||||
if (virTypedParamsSerialize(params, nparams,
|
||||
(virTypedParameterRemotePtr *) &args.params.params_val,
|
||||
&args.params.params_len, 0) < 0) {
|
||||
&args.params.params_len,
|
||||
VIR_TYPED_PARAM_STRING_OKAY) < 0) {
|
||||
xdr_free((xdrproc_t) xdr_remote_domain_migrate_confirm3_params_args,
|
||||
(char *) &args);
|
||||
goto cleanup;
|
||||
|
@ -1215,7 +1215,8 @@ elsif ($mode eq "client") {
|
||||
push(@args_list, "int n$1");
|
||||
push(@setters_list2, "if (virTypedParamsSerialize($1, n$1,\n" .
|
||||
" (virTypedParameterRemotePtr *) &args.$1.$1_val,\n" .
|
||||
" &args.$1.$1_len, 0) < 0) {\n" .
|
||||
" &args.$1.$1_len,\n" .
|
||||
" VIR_TYPED_PARAM_STRING_OKAY) < 0) {\n" .
|
||||
" xdr_free((xdrproc_t)xdr_$call->{args}, (char *)&args);\n" .
|
||||
" goto done;\n" .
|
||||
" }");
|
||||
|
Loading…
x
Reference in New Issue
Block a user