[CalendarServer-changes] [9873] PyKerberos/trunk/src/kerberosgss.c

source_changes at macosforge.org source_changes at macosforge.org
Thu Sep 27 15:18:25 PDT 2012


Revision: 9873
          http://trac.calendarserver.org//changeset/9873
Author:   wsanchez at apple.com
Date:     2012-09-27 15:18:25 -0700 (Thu, 27 Sep 2012)
Log Message:
-----------
Release the GIL during gss_client/server_step
Fixes Ticket #513.
Submitted by tylerlhobbs at gmail.com

Modified Paths:
--------------
    PyKerberos/trunk/src/kerberosgss.c

Modified: PyKerberos/trunk/src/kerberosgss.c
===================================================================
--- PyKerberos/trunk/src/kerberosgss.c	2012-09-27 22:13:27 UTC (rev 9872)
+++ PyKerberos/trunk/src/kerberosgss.c	2012-09-27 22:18:25 UTC (rev 9873)
@@ -222,6 +222,7 @@
     }
     
     // Do GSSAPI step
+    Py_BEGIN_ALLOW_THREADS
     maj_stat = gss_init_sec_context(&min_stat,
                                     state->client_creds,
                                     &state->context,
@@ -235,6 +236,7 @@
                                     &output_token,
                                     NULL,
                                     NULL);
+    Py_END_ALLOW_THREADS
     
     if ((maj_stat != GSS_S_COMPLETE) && (maj_stat != GSS_S_CONTINUE_NEEDED))
     {
@@ -537,6 +539,7 @@
         goto end;
     }
     
+    Py_BEGIN_ALLOW_THREADS
     maj_stat = gss_accept_sec_context(&min_stat,
                                       &state->context,
                                       state->server_creds,
@@ -548,6 +551,7 @@
                                       NULL,
                                       NULL,
                                       &state->client_creds);
+    Py_END_ALLOW_THREADS
     
     if (GSS_ERROR(maj_stat))
     {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120927/60761fd9/attachment.html>


More information about the calendarserver-changes mailing list