View | Details | Raw Unified | Return to bug 164442
Collapse All | Expand All

(-)Makefile (-2 / +4 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	memcacheq
8
PORTNAME=	memcacheq
9
PORTVERSION=	0.2.0
9
PORTVERSION=	0.2.0
10
PORTREVISION=	1
10
PORTREVISION=	2
11
CATEGORIES=	databases
11
CATEGORIES=	databases
12
MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE} \
12
MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE} \
13
		${MASTER_SITE_GENTOO}
13
		${MASTER_SITE_GENTOO}
Lines 16-21 Link Here
16
MAINTAINER=	m.tsatsenko@gmail.com
16
MAINTAINER=	m.tsatsenko@gmail.com
17
COMMENT=	Simple queue service over Memcache
17
COMMENT=	Simple queue service over Memcache
18
18
19
LICENSE=	BSD
20
19
LIB_DEPENDS=	event-1.4:${PORTSDIR}/devel/libevent
21
LIB_DEPENDS=	event-1.4:${PORTSDIR}/devel/libevent
20
22
21
USE_CSTD=	gnu89
23
USE_CSTD=	gnu89
Lines 23-29 Link Here
23
LDFLAGS+=	-l"${BDB_LIB_NAME}" -L"${LOCALBASE}/lib"
25
LDFLAGS+=	-l"${BDB_LIB_NAME}" -L"${LOCALBASE}/lib"
24
26
25
USE_RC_SUBR=	memcacheq
27
USE_RC_SUBR=	memcacheq
26
USE_BDB=	47+
28
USE_BDB=	5
27
GNU_CONFIGURE=	YES
29
GNU_CONFIGURE=	YES
28
CONFIGURE_ARGS=	--with-libevent=${LOCALBASE} --with-bdb=${LOCALBASE} --enable-threads
30
CONFIGURE_ARGS=	--with-libevent=${LOCALBASE} --with-bdb=${LOCALBASE} --enable-threads
29
31
(-)files/patch-bdb.c (+41 lines)
Added Link Here
1
--- bdb.c.orig	2012-01-24 14:49:12.248201883 +0400
2
+++ bdb.c	2012-01-24 14:50:35.801194396 +0400
3
@@ -264,8 +264,6 @@
4
 }
5
 
6
 int bdb_create_queue(char *queue_name) {
7
-    pthread_rwlock_wrlock(&qlist_ht_lock);
8
-
9
     char *k = strdup(queue_name);
10
     assert(k != NULL);
11
     queue_t *q = (queue_t *)calloc(1, sizeof(queue_t));
12
@@ -309,14 +307,12 @@
13
     CHECK_DB_RET(ret);
14
     int result = hashtable_insert(qlist_htp, (void *)k, (void *)q);
15
     assert(result != 0);
16
-    pthread_rwlock_unlock(&qlist_ht_lock);
17
     return 0;
18
 dberr:
19
     if (txnp != NULL){
20
         txnp->abort(txnp);
21
     }
22
     fprintf(stderr, "bdb_create_queue: %s %s\n", queue_name, db_strerror(ret));
23
-    pthread_rwlock_unlock(&qlist_ht_lock);
24
     return -1;
25
 }
26
 
27
@@ -554,12 +550,13 @@
28
 
29
     if (NULL == q) {
30
         pthread_rwlock_unlock(&qlist_ht_lock);
31
+        /* switch to write lock */
32
+        pthread_rwlock_wrlock(&qlist_ht_lock);
33
         ret = bdb_create_queue(key);
34
         if (0 != ret){
35
             return -1;
36
         }
37
         /* search again */
38
-        pthread_rwlock_rdlock(&qlist_ht_lock);
39
         q = (queue_t *)hashtable_search(qlist_htp, (void *)key);        
40
     }
41
     
(-)files/patch-configure (+11 lines)
Added Link Here
1
--- configure.orig	2011-10-14 14:34:47.367393592 +0400
2
+++ configure	2011-10-14 14:34:57.769420421 +0400
3
@@ -5505,7 +5505,7 @@
4
   enableval=$enable_threads;
5
 fi
6
 
7
-if test "x$enable_threads" == "xyes"; then
8
+if test "x$enable_threads" = "xyes"; then
9
   { echo "$as_me:$LINENO: checking for library containing pthread_create" >&5
10
 echo $ECHO_N "checking for library containing pthread_create... $ECHO_C" >&6; }
11
 if test "${ac_cv_search_pthread_create+set}" = set; then

Return to bug 164442