- Prevent backend crash when D-Bus not running (bug #474362).

This commit is contained in:
Tim Waugh 2008-12-11 11:13:33 +00:00
parent 766fdcd043
commit 90831de7d0
2 changed files with 21 additions and 1 deletions

13
hplip-dbus.patch Normal file
View File

@ -0,0 +1,13 @@
diff -up hplip-2.8.7/prnt/backend/hp.c.dbus hplip-2.8.7/prnt/backend/hp.c
--- hplip-2.8.7/prnt/backend/hp.c.dbus 2008-12-11 10:44:30.000000000 +0000
+++ hplip-2.8.7/prnt/backend/hp.c 2008-12-11 10:46:15.000000000 +0000
@@ -489,6 +489,9 @@ static int device_event(const char *dev,
DBusMessage * msg = NULL;
int id = atoi(jobid);
+ if (dbus_conn == NULL)
+ return 0;
+
msg = dbus_message_new_signal(DBUS_PATH, DBUS_INTERFACE, "Event");
if (NULL == msg)

View File

@ -1,7 +1,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 2.8.7
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv2+ and MIT
Group: System Environment/Daemons
Conflicts: system-config-printer < 0.6.132
@ -18,6 +18,7 @@ Patch1: hplip-desktop.patch
Patch2: hplip-gzip-n.patch
Patch3: hplip-quiet.patch
Patch4: hplip-marker-supply.patch
Patch5: hplip-dbus.patch
Patch6: hplip-systray.patch
Patch8: hplip-libsane.patch
Patch12: hplip-no-root-config.patch
@ -114,6 +115,9 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version}
# Low ink is a warning condition, not an error.
%patch4 -p1 -b .marker-supply
# Prevent backend crash when D-Bus not running (bug #474362).
%patch5 -p1 -b .dbus
# Make --qt4 the default for the systray applet, so that it appears
# in the right place.
%patch6 -p1 -b .systray
@ -306,6 +310,9 @@ fi
exit 0
%changelog
* Thu Dec 11 2008 Tim Waugh <twaugh@redhat.com> 2.8.7-5
- Prevent backend crash when D-Bus not running (bug #474362).
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.8.7-4
- Rebuild for Python 2.6