parent
8882f95167
commit
10829b97af
15
cups-str3875.patch
Normal file
15
cups-str3875.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -up cups-1.4.7/backend/snmp-supplies.c.str3875 cups-1.4.7/backend/snmp-supplies.c
|
||||
--- cups-1.4.7/backend/snmp-supplies.c.str3875 2011-07-07 16:44:41.000000000 +0200
|
||||
+++ cups-1.4.7/backend/snmp-supplies.c 2011-07-07 16:48:19.201008765 +0200
|
||||
@@ -259,7 +259,10 @@ backendSNMPSupplies(
|
||||
if (quirks & QUIRK_CAPACITY)
|
||||
supplies[i].max_capacity = 100;
|
||||
|
||||
- percent = 100 * supplies[i].level / supplies[i].max_capacity;
|
||||
+ if (supplies[i].max_capacity > 0)
|
||||
+ percent = 100 * supplies[i].level / supplies[i].max_capacity;
|
||||
+ else
|
||||
+ percent = 50;
|
||||
|
||||
if (percent <= 10)
|
||||
{
|
@ -8,7 +8,7 @@
|
||||
Summary: Common Unix Printing System
|
||||
Name: cups
|
||||
Version: 1.4.7
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
|
||||
@ -64,6 +64,7 @@ Patch30: cups-hp-deviceid-oid.patch
|
||||
Patch31: cups-dnssd-deviceid.patch
|
||||
Patch32: cups-ricoh-deviceid-oid.patch
|
||||
Patch33: cups-texttops-rotate-page.patch
|
||||
Patch34: cups-str3875.patch
|
||||
|
||||
Patch100: cups-lspp.patch
|
||||
|
||||
@ -262,6 +263,8 @@ module.
|
||||
# This fixes page-label orientation when texttops is used in the
|
||||
# filter chain (bug #572338).
|
||||
%patch33 -p1 -b .texttops-rotate-page
|
||||
# Fix SNMP supply level crasher (STR #3875, bug #719057).
|
||||
%patch34 -p1 -b .str3875
|
||||
|
||||
%if %lspp
|
||||
# LSPP support.
|
||||
@ -565,6 +568,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{php_extdir}/phpcups.so
|
||||
|
||||
%changelog
|
||||
* Thu Jul 7 2011 Jiri Popelka <jpopelka@redhat.com> 1:1.4.7-5
|
||||
- Fix SNMP supply level crasher (STR #3875, bug #719057).
|
||||
|
||||
* Thu Jul 7 2011 Tim Waugh <twaugh@redhat.com> 1:1.4.7-4
|
||||
- Undo last change which had no effect. We already remove the .SILENT
|
||||
target from the Makefile as part of the build.
|
||||
|
Loading…
Reference in New Issue
Block a user