~ubuntu-branches/ubuntu/gutsy/cyrus-sasl2/gutsy-201105300151

« back to all changes in this revision

Viewing changes to debian/patches/08_mutex.diff

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2006-11-27 12:59:40 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20061127125940-na3q3g3tkydvyvgl
Tags: 2.1.22.dfsg1-4ubuntu1
* Merge from debian unstable, remaining changes:
  - remove stop links from rc0 and rc6
  - build against db4.3 instead of 4.2
  - build against heimdal-dev instead of libkrb5-dev
  - depend on, don't recommend, modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -urN cyrus-sasl-2.1.19.dfsg1/lib/common.c cyrus-sasl-2.1.19.dfsg1.new/lib/common.c
2
 
--- cyrus-sasl-2.1.19.dfsg1/lib/common.c        2004-03-10 15:51:35.000000000 +0000
3
 
+++ cyrus-sasl-2.1.19.dfsg1.new/lib/common.c    2004-03-20 21:58:39.000000000 +0000
4
 
@@ -440,7 +440,7 @@
5
 
     result = sasl_canonuser_add_plugin("INTERNAL", internal_canonuser_init);
6
 
     if(result != SASL_OK) return result;    
7
 
 
8
 
-    if (!free_mutex)
9
 
+    if (!free_mutex || free_mutex == 0x1)
10
 
        free_mutex = sasl_MUTEX_ALLOC();
11
 
     if (!free_mutex) return SASL_FAIL;
12
 
 
13
 
@@ -459,6 +459,11 @@
14
 
 
15
 
   /* serialize disposes. this is necessary because we can't
16
 
      dispose of conn->mutex if someone else is locked on it */
17
 
+
18
 
+  if (! free_mutex || free_mutex == 0x1)
19
 
+    free_mutex = sasl_MUTEX_ALLOC();
20
 
+  if (! free_mutex) return SASL_FAIL;
21
 
+
22
 
   result = sasl_MUTEX_LOCK(free_mutex);
23
 
   if (result!=SASL_OK) return;
24