]> git.ipfire.org Git - thirdparty/libvirt.git/commit
rpc: improve error message for bounds check
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 11 May 2017 10:20:59 +0000 (11:20 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 11 Jul 2017 14:16:41 +0000 (15:16 +0100)
commitc8fb3c31594481f54d384eb12fe81b0e6f50dcce
tree4f1b3aa3d6bce374a77560f0821ae54253aed333
parent2277edb964731b7b2f80c371148f01848a03eacf
rpc: improve error message for bounds check

If we exceed a fixed limit in RPC code we get a horrible message
like this, if the parameter type is a 'string', because we forgot
to initialize the error message type field:

  $ virsh snapshot-list ostack1
  error: too many remote undefineds: 1329 > 1024

It would also be useful to know which RPC call and field was
exceeded. So this patch makes us report:

  $ virsh snapshot-list ostack1
  error: too many remote undefineds: 1329 > 1024,
  in parameter 'names' for 'virDomainSnapshotListNames'

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/rpc/gendispatch.pl