diff options
author | Erik Skultety <eskultet@redhat.com> | 2016-02-02 14:13:15 +0100 |
---|---|---|
committer | Erik Skultety <eskultet@redhat.com> | 2016-02-03 15:46:45 +0100 |
commit | 8cd1d546e67f77a72a026d502726a7a961dd43ed (patch) | |
tree | 1bc213bc257f06753c943ef83962872b831e59be /src/rpc/gendispatch.pl | |
parent | 9afc115f7308199a7e678c3156832e826696629a (diff) | |
download | libvirt-8cd1d546e67f77a72a026d502726a7a961dd43ed.tar.gz |
util: Export remoteSerializeTypedParameters internally via util
Same as for deserializer, this method might get handy for admin one day.
The major reason for this patch is to stay consistent with idea, i.e.
when deserializer can be shared, why not serializer as well. The only
problem to be solved was that the daemon side serializer uses a code
snippet which handles sparse arrays returned by some APIs as well as
removes any string parameters that can't be returned to older clients.
This patch makes of the new virTypedParameterRemote datatype introduced
by one of the pvious patches.
Diffstat (limited to 'src/rpc/gendispatch.pl')
-rwxr-xr-x | src/rpc/gendispatch.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index 9d64e63a04..658efaeef9 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -1213,7 +1213,9 @@ elsif ($mode eq "client") { } elsif ($args_member =~ m/^remote_typed_param (\S+)<(\S+)>;/) { push(@args_list, "virTypedParameterPtr $1"); push(@args_list, "int n$1"); - push(@setters_list2, "if (remoteSerializeTypedParameters($1, n$1, &args.$1.$1_val, &args.$1.$1_len) < 0) {\n" . + push(@setters_list2, "if (virTypedParamsSerialize($1, n$1,\n" . + " (virTypedParameterRemotePtr *) &args.$1.$1_val,\n" . + " &args.$1.$1_len, 0) < 0) {\n" . " xdr_free((xdrproc_t)xdr_$call->{args}, (char *)&args);\n" . " goto done;\n" . " }"); |