-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

the error in pycurl is a reversed logic of PyThread_acquire_lock(): on
success, it returns 1, else 0. The code in pycurl_ssl_mutex_lock()
assumes otherwise.
The attached patch fixes the logic, which also fixes the mentioned
example on my box.

Regards,
  Bastian
- --
  ,''`.                  Bastian Kleineidam
 : :' :                    GnuPG Schlüssel
 `. `'    gpg --keyserver wwwkeys.pgp.net --recv-keys 32EC6F3E
   `-

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE14dQeBwlBDLsbz4RAsjeAJ4/xjwd90KEIJgwD84LiAkBOP8g+wCgpCuC
vYjdOa54fCEu4b/DQ3kRQKo=
=pthT
-----END PGP SIGNATURE-----
--- pycurl.c_   2006-08-07 20:28:46.694127911 +0200
+++ pycurl.c    2006-08-07 20:28:56.333679645 +0200
@@ -416,7 +416,7 @@
 
 static int pycurl_ssl_mutex_lock(void **m)
 {
-    return PyThread_acquire_lock(*((PyThread_type_lock *) m), 1);
+    return !PyThread_acquire_lock(*((PyThread_type_lock *) m), 1);
 }
 
 static int pycurl_ssl_mutex_unlock(void **m)

Reply via email to