[csw-devel] SF.net SVN: gar:[6935] csw/mgar/pkg/cups/branches/cups-1.4.0
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Wed Oct 21 12:43:59 CEST 2009
Revision: 6935
http://gar.svn.sourceforge.net/gar/?rev=6935&view=rev
Author: wahwah
Date: 2009-10-21 10:43:59 +0000 (Wed, 21 Oct 2009)
Log Message:
-----------
cups-1.4.0: A better patch for the cups-polld problem
Modified Paths:
--------------
csw/mgar/pkg/cups/branches/cups-1.4.0/Makefile
csw/mgar/pkg/cups/branches/cups-1.4.0/checksums
Added Paths:
-----------
csw/mgar/pkg/cups/branches/cups-1.4.0/files/0005-Mapping-gnutls_record_recv-return-error-codes-to-err.patch
Removed Paths:
-------------
csw/mgar/pkg/cups/branches/cups-1.4.0/files/0005-Mapping-GNUTLS_E_INVALID_SESSION-to-EIO-in-http_read.patch
Modified: csw/mgar/pkg/cups/branches/cups-1.4.0/Makefile
===================================================================
--- csw/mgar/pkg/cups/branches/cups-1.4.0/Makefile 2009-10-21 10:29:02 UTC (rev 6934)
+++ csw/mgar/pkg/cups/branches/cups-1.4.0/Makefile 2009-10-21 10:43:59 UTC (rev 6935)
@@ -21,13 +21,13 @@
# There's a problem with cups-polld going into a busy-wait loop when polling
# print servers.
#
-# http://www.cups.org/str.php?L3257
+# http://www.cups.org/str.php?L3257 (closed)
+# http://www.cups.org/str.php?L3381 (filed again)
#
# The problem with cups-polld seems to be going away when CUPS is compiled with
# debugging symbols. The debugging options is turned on for this package, in
# order to be able to debug the binary if it ever shows the problem.
-#
-# TODO: Check whether the issue is gone or not.
+
GARFLAVOR = DBG
# These are the source mirrors published on the CUPS home-page.
@@ -52,7 +52,7 @@
PATCHFILES += 0002-Adding-the-refcount-member-to-mime_type_t.patch
PATCHFILES += 0003-Reference-counting-for-printers-only.patch
# PATCHFILES += 0004-Fix-for-usb-unix.c-from-http-www.cups.org-str.php-L3.patch
-PATCHFILES += 0005-Mapping-GNUTLS_E_INVALID_SESSION-to-EIO-in-http_read.patch
+PATCHFILES += 0005-Mapping-gnutls_record_recv-return-error-codes-to-err.patch
PATCHFILES += 0006-Fail-compilation-if-no-SSL-impl-chosen.patch
PREREQUISITE_PKGS = CSWggettext
Modified: csw/mgar/pkg/cups/branches/cups-1.4.0/checksums
===================================================================
--- csw/mgar/pkg/cups/branches/cups-1.4.0/checksums 2009-10-21 10:29:02 UTC (rev 6934)
+++ csw/mgar/pkg/cups/branches/cups-1.4.0/checksums 2009-10-21 10:43:59 UTC (rev 6935)
@@ -1,7 +1,7 @@
1e5e54a2b503cfdeeda1b683bcccab83 0001-cswcups-for-service-name.patch
0da4ea6bf72d61adfc4316a738b90ab5 0002-Adding-the-refcount-member-to-mime_type_t.patch
a80b8543633e2f9b3b1e531ac2289306 0003-Reference-counting-for-printers-only.patch
-2fd940524ebf6d6c0c22f4e52e253911 0005-Mapping-GNUTLS_E_INVALID_SESSION-to-EIO-in-http_read.patch
+bbf0295c76cd06b5311ac3a3467fd431 0005-Mapping-gnutls_record_recv-return-error-codes-to-err.patch
0dd35cc0938696577104852781ec1df6 0006-Fail-compilation-if-no-SSL-impl-chosen.patch
dec0baa8c3ec0e171183496da8f24323 CSWcupsclient.preinstall
ca7718998e56c320c08a77cfefe046f6 CSWcupsd.postremove
Deleted: csw/mgar/pkg/cups/branches/cups-1.4.0/files/0005-Mapping-GNUTLS_E_INVALID_SESSION-to-EIO-in-http_read.patch
===================================================================
--- csw/mgar/pkg/cups/branches/cups-1.4.0/files/0005-Mapping-GNUTLS_E_INVALID_SESSION-to-EIO-in-http_read.patch 2009-10-21 10:29:02 UTC (rev 6934)
+++ csw/mgar/pkg/cups/branches/cups-1.4.0/files/0005-Mapping-GNUTLS_E_INVALID_SESSION-to-EIO-in-http_read.patch 2009-10-21 10:43:59 UTC (rev 6935)
@@ -1,35 +0,0 @@
-From 101afaf697b8cbd8d0194febbba3ea94d99086ab Mon Sep 17 00:00:00 2001
-From: Maciej Blizinski <maciej at opencsw.org>
-Date: Tue, 20 Oct 2009 15:05:58 +0200
-Subject: [PATCH] Mapping GNUTLS_E_INVALID_SESSION to EIO in http_read_ssl
-
----
- cups/http.c | 12 +++++++++++-
- 1 files changed, 11 insertions(+), 1 deletions(-)
-
-diff --git a/cups/http.c b/cups/http.c
-index 840e3fc..47b9c0a 100644
---- a/cups/http.c
-+++ b/cups/http.c
-@@ -2719,7 +2719,17 @@ http_read_ssl(http_t *http, /* I - Connection to server */
- return (SSL_read((SSL *)(http->tls), buf, len));
-
- # elif defined(HAVE_GNUTLS)
-- return (gnutls_record_recv(((http_tls_t *)(http->tls))->session, buf, len));
-+ int bytes;
-+ bytes = (gnutls_record_recv(((http_tls_t *)(http->tls))->session, buf, len));
-+ if (bytes < 0) {
-+ if (bytes == GNUTLS_E_INVALID_SESSION) {
-+ errno = EIO; /* Not sure which value to map it to. */
-+ } else if (bytes < 0 && !errno) {
-+ /* Shouldn't happen! Need a warning or an error, or something similar. */
-+ DEBUG_printf(("gnutls_record_recv() returned a negative number but errno=0."));
-+ }
-+ }
-+ return bytes;
-
- # elif defined(HAVE_CDSASSL)
- int result; /* Return value */
---
-1.6.5
-
Added: csw/mgar/pkg/cups/branches/cups-1.4.0/files/0005-Mapping-gnutls_record_recv-return-error-codes-to-err.patch
===================================================================
--- csw/mgar/pkg/cups/branches/cups-1.4.0/files/0005-Mapping-gnutls_record_recv-return-error-codes-to-err.patch (rev 0)
+++ csw/mgar/pkg/cups/branches/cups-1.4.0/files/0005-Mapping-gnutls_record_recv-return-error-codes-to-err.patch 2009-10-21 10:43:59 UTC (rev 6935)
@@ -0,0 +1,42 @@
+From 77851ae023d84a70379d8897ca5b2e5cfcfebeba Mon Sep 17 00:00:00 2001
+From: Maciej Blizinski <maciej at opencsw.org>
+Date: Wed, 21 Oct 2009 12:40:39 +0200
+Subject: [PATCH] Mapping gnutls_record_recv return error codes to errno
+
+---
+ cups/http.c | 19 ++++++++++++++++++-
+ 1 files changed, 18 insertions(+), 1 deletions(-)
+
+diff --git a/cups/http.c b/cups/http.c
+index 840e3fc..e255375 100644
+--- a/cups/http.c
++++ b/cups/http.c
+@@ -2719,7 +2719,24 @@ http_read_ssl(http_t *http, /* I - Connection to server */
+ return (SSL_read((SSL *)(http->tls), buf, len));
+
+ # elif defined(HAVE_GNUTLS)
+- return (gnutls_record_recv(((http_tls_t *)(http->tls))->session, buf, len));
++ int result;
++ result = (gnutls_record_recv(((http_tls_t *)(http->tls))->session, buf, len));
++ if (result < 0 && !errno) {
++ switch (result)
++ {
++ case GNUTLS_E_INTERRUPTED :
++ errno = EINTR;
++ break;
++ case GNUTLS_E_AGAIN :
++ errno = EAGAIN;
++ break;
++ default :
++ errno = EPIPE;
++ break;
++ }
++ result = -1;
++ }
++ return result;
+
+ # elif defined(HAVE_CDSASSL)
+ int result; /* Return value */
+--
+1.6.5
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list