]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Ensure LXC/QEMU APIs set the filename for errors
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 2 Aug 2013 11:15:15 +0000 (12:15 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 2 Aug 2013 14:32:26 +0000 (15:32 +0100)
The virLibConnError macros in libvirt-lxc.c and
libvirt-qemu.c were passing NULL for the filename.
This causes a crash if the logging code is configured
to use journald.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/libvirt-lxc.c
src/libvirt-qemu.c

index da69dce879c9ca27e1ea3a9d14495cf367c2d994..c8cdcea70ea2528f01008b2d08ba9e4157c50ae4 100644 (file)
 
 #define VIR_FROM_THIS VIR_FROM_NONE
 
-#define virLibConnError(conn, error, info)                               \
-    virReportErrorHelper(VIR_FROM_NONE, error, NULL, __FUNCTION__,       \
+#define virLibConnError(conn, error, info)                              \
+    virReportErrorHelper(VIR_FROM_NONE, error, __FILE__, __FUNCTION__,  \
                          __LINE__, info)
 
 #define virLibDomainError(domain, error, info)                          \
-    virReportErrorHelper(VIR_FROM_DOM, error, NULL, __FUNCTION__,       \
+    virReportErrorHelper(VIR_FROM_DOM, error, __FILE__, __FUNCTION__,   \
                          __LINE__, info)
 
 /**
index 2a1432b862d04724c72590147a343644085701d6..83fb3b3ab4ec69d910adaae26a4ce94be19d223e 100644 (file)
 
 #define VIR_FROM_THIS VIR_FROM_NONE
 
-#define virLibConnError(conn, error, info)                               \
-    virReportErrorHelper(VIR_FROM_NONE, error, NULL, __FUNCTION__,       \
+#define virLibConnError(conn, error, info)                              \
+    virReportErrorHelper(VIR_FROM_NONE, error, __FILE__, __FUNCTION__,  \
                          __LINE__, info)
 
 #define virLibDomainError(domain, error, info)                          \
-    virReportErrorHelper(VIR_FROM_DOM, error, NULL, __FUNCTION__,       \
+    virReportErrorHelper(VIR_FROM_DOM, error, __FILE__, __FUNCTION__,   \
                          __LINE__, info)
 
 /**