aboutsummaryrefslogtreecommitdiff
path: root/dns/powerdns-devel/files/patch-pdns_backends_bind_bindbackend2_hh
blob: a35c0411fa9a8c1c0efce3b6f64f395abcab4532 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- pdns/backends/bind/bindbackend2.hh.orig	Sun Sep 28 20:20:03 2003
+++ pdns/backends/bind/bindbackend2.hh		Mon Nov 17 20:54:19 2003
@@ -58,21 +58,20 @@
 
   bool tryRLock()
   {
-    //    cout<<"[trylock!] "<<(void*)d_rwlock<<"/"<<getpid()<<endl;
-    return pthread_rwlock_tryrdlock(d_rwlock)!=EBUSY;
+    //    cout<<"[trylock!] "<<d_rwlock<<"/"<<getpid()<<endl;
+    return pthread_rwlock_tryrdlock(&d_rwlock)!=EBUSY;
   }
   
   void unlock()
   {
-    //    cout<<"[unlock] "<<(void*)d_rwlock<<"/"<<getpid()<<endl;
-    pthread_rwlock_unlock(d_rwlock);
+    //    cout<<"[unlock] "<<d_rwlock<<"/"<<getpid()<<endl;
+    pthread_rwlock_unlock(&d_rwlock);
   }
   
   void lock()
   {
-    //cout<<"[writelock!] "<<(void*)d_rwlock<<"/"<<getpid()<<endl;
-
-    pthread_rwlock_wrlock(d_rwlock);
+    //   cout<<"[writelock!] "<<d_rwlock<<"/"<<getpid()<<endl;
+    pthread_rwlock_wrlock(&d_rwlock);
   }
 
   void setCheckInterval(time_t seconds);
@@ -81,7 +80,7 @@
   time_t getCtime();
   time_t d_checkinterval;
   time_t d_lastcheck;
-  pthread_rwlock_t *d_rwlock;
+  pthread_rwlock_t d_rwlock;
 };