- Use upstream fix for async bugs.

This commit is contained in:
Tim Waugh 2010-03-27 10:15:38 +00:00
parent 1fcc63811b
commit d52b8a8427
2 changed files with 62 additions and 3 deletions

View File

@ -1,6 +1,6 @@
diff -up system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback system-config-printer-1.2.0/asyncipp.py diff -up system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback system-config-printer-1.2.0/asyncipp.py
--- system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback 2010-03-26 12:50:39.829627667 +0000 --- system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback 2010-03-27 10:12:14.667366971 +0000
+++ system-config-printer-1.2.0/asyncipp.py 2010-03-26 12:50:51.888627367 +0000 +++ system-config-printer-1.2.0/asyncipp.py 2010-03-27 10:13:04.081365616 +0000
@@ -59,6 +59,7 @@ class _IPPConnectionThread(threading.Thr @@ -59,6 +59,7 @@ class _IPPConnectionThread(threading.Thr
self._auth_handler = auth_handler self._auth_handler = auth_handler
self._auth_queue = Queue.Queue (1) self._auth_queue = Queue.Queue (1)
@ -49,3 +49,59 @@ diff -up system-config-printer-1.2.0/asyncipp.py.asyncipp-traceback system-confi
### ###
### This is the user-visible class. Although it does not inherit from ### This is the user-visible class. Although it does not inherit from
diff -up system-config-printer-1.2.0/asyncpk1.py.asyncipp-traceback system-config-printer-1.2.0/asyncpk1.py
--- system-config-printer-1.2.0/asyncpk1.py.asyncipp-traceback 2010-03-27 10:12:14.702364469 +0000
+++ system-config-printer-1.2.0/asyncpk1.py 2010-03-27 10:13:06.407243790 +0000
@@ -64,6 +64,7 @@ class _PK1AsyncMethodCall:
self._fallback_fn = fallback_fn
self._fallback_args = args
self._fallback_kwds = kwds
+ self._destroyed = False
debugprint ("+_PK1AsyncMethodCall: %s" % self)
def __del__ (self):
@@ -85,6 +86,7 @@ class _PK1AsyncMethodCall:
def _destroy (self):
debugprint ("DESTROY: %s" % self)
+ self._destroyed = True
del self._bus
del self._conn
del self._pk_method_name
@@ -97,6 +99,9 @@ class _PK1AsyncMethodCall:
del self._fallback_kwds
def _pk_reply_handler (self, error, *args):
+ if self._destroyed:
+ return
+
if str (error) == '':
self._client_reply_handler (self._conn, self._unpack_fn (*args))
self._destroy ()
@@ -106,6 +111,9 @@ class _PK1AsyncMethodCall:
self.call_fallback_fn ()
def _pk_error_handler (self, exc):
+ if self._destroyed:
+ return
+
if exc.get_dbus_name () == CUPS_PK_NEED_AUTH:
exc = cups.IPPError (cups.IPP_NOT_AUTHORIZED, 'pkcancel')
self._client_error_handler (self._conn, exc)
@@ -123,10 +131,16 @@ class _PK1AsyncMethodCall:
self._fallback_fn (*self._fallback_args, **self._fallback_kwds)
def _ipp_reply_handler (self, conn, *args):
+ if self._destroyed:
+ return
+
self._client_reply_handler (self._conn, *args)
self._destroy ()
def _ipp_error_handler (self, conn, *args):
+ if self._destroyed:
+ return
+
self._client_error_handler (self._conn, *args)
self._destroy ()

View File

@ -7,7 +7,7 @@
Summary: A printer administration tool Summary: A printer administration tool
Name: system-config-printer Name: system-config-printer
Version: 1.2.0 Version: 1.2.0
Release: 11%{?dist} Release: 12%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://cyberelk.net/tim/software/system-config-printer/ URL: http://cyberelk.net/tim/software/system-config-printer/
Group: System Environment/Base Group: System Environment/Base
@ -258,6 +258,9 @@ rm -rf %buildroot
exit 0 exit 0
%changelog %changelog
* Sat Mar 27 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-12
- Use upstream fix for async bugs.
* Fri Mar 26 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-11 * Fri Mar 26 2010 Tim Waugh <twaugh@redhat.com> - 1.2.0-11
- More async traceback fixes (Ubuntu #547075). - More async traceback fixes (Ubuntu #547075).