Update to 0.1.3

Fix #724959
This commit is contained in:
Marek Kasik 2011-08-05 16:26:40 +02:00
parent bd1152b731
commit 130b5d9bec
4 changed files with 34 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
cups-pk-helper-0.0.4.tar.bz2
/cups-pk-helper-0.1.1.tar.bz2
/cups-pk-helper-0.1.2.tar.bz2
/cups-pk-helper-0.1.3.tar.bz2

View File

@ -0,0 +1,23 @@
diff --git a/src/cups-pk-helper-mechanism.c b/src/cups-pk-helper-mechanism.c
index 273c262..8b3d781 100644
--- a/src/cups-pk-helper-mechanism.c
+++ b/src/cups-pk-helper-mechanism.c
@@ -205,6 +205,8 @@ register_mechanism (CphMechanism *mechanism)
{
GError *error;
+ g_return_val_if_fail (CPH_IS_MECHANISM (mechanism), FALSE);
+
mechanism->priv->pol_auth = polkit_authority_get ();
error = NULL;
@@ -238,7 +240,8 @@ cph_mechanism_new (void)
object = g_object_new (CPH_TYPE_MECHANISM, NULL);
if (!register_mechanism (CPH_MECHANISM (object))) {
- g_object_unref (object);
+ if (object)
+ g_object_unref (object);
return NULL;
}

View File

@ -1,5 +1,5 @@
Name: cups-pk-helper
Version: 0.1.2
Version: 0.1.3
Release: 1%{?dist}
Summary: A helper that makes system-config-printer use PolicyKit
@ -8,6 +8,8 @@ License: GPLv2+
URL: http://www.vuntz.net/download/cups-pk-helper/
Source0: http://cgit.freedesktop.org/cups-pk-helper/snapshot/cups-pk-helper-%{version}.tar.bz2
Patch0: cups-pk-helper-check-mechanism.patch
BuildRequires: libtool >= 1.4.3
BuildRequires: cups-devel >= 1.2
BuildRequires: python-devel >= 2.4
@ -35,6 +37,8 @@ interfaces available under control of PolicyKit.
%prep
%setup -q
%patch0 -p1 -b .check-mechanism
%build
# grr, tarball without configure
./autogen.sh
@ -60,6 +64,10 @@ make install DESTDIR=$RPM_BUILD_ROOT
%changelog
* Fri Aug 5 2011 Marek Kasik <mkasik@redhat.com> - 0.1.3-1
- Update to 0.1.3
- Fix #724959
* Wed Mar 23 2011 Marek Kasik <mkasik@redhat.com> - 0.1.2-1
- Update to 0.1.2

View File

@ -1 +1 @@
2c02eb07c7423fde1db943b83748f774 cups-pk-helper-0.1.2.tar.bz2
885eabdf404cc80797478cc52414b21b cups-pk-helper-0.1.3.tar.bz2