Re: [PATCH v2 1/2] util: eliminate duplicate function virDBusMessageRead

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

 



On Fri, Apr 12, 2019 at 01:26:57PM -0400, Laine Stump wrote:
> When virDBusMessageRead() and virDBusMessageDecode were first added in
> commit 834c9c94, they were identical except that virDBusMessageRead()
> would unref the message after decoding it.
> 
> This difference was eliminated later in commit dc7f3ffc after it
> became apparent that unref-ing the message so soon was never the right
> thing to do. The two identical functions remained though, with the
> tests and virDBus library itself calling the Decode variant, and all
> other users calling the Read variant.
> 
> This patch eliminates the duplication, switching all users to
> virDBusMessageDecode (and moving the nice API documentation comment
> from the Read function up to the Decode function).
> 
> Signed-off-by: Laine Stump <laine@xxxxxxxxx>
> ---
>  src/libvirt_private.syms |  1 -
>  src/util/virdbus.c       | 53 +++++++++++++---------------------------
>  src/util/virdbus.h       |  4 +--
>  src/util/virdbuspriv.h   |  4 ---
>  src/util/virfirewalld.c  |  8 +++---
>  src/util/virpolkit.c     | 12 ++++-----
>  src/util/virsystemd.c    |  6 ++---
>  tests/virpolkittest.c    | 24 +++++++++---------
>  8 files changed, 44 insertions(+), 68 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux