提交 d9c57ca9 编写于 作者: J Joao Martins 提交者: Erik Skultety

remote: enforce VIR_TYPED_PARAM_STRING_OKAY flag on client side serialization

Commit 8cd1d546 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.htmlSigned-off-by: NJoao Martins <joao.m.martins@oracle.com>
Signed-off-by: NErik Skultety <eskultet@redhat.com>
上级 a0aa92a2
......@@ -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" .
" }");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册