Browse Source

Add locking of database in hdb_handle_refcount_get

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2290 fd59a12c-fef9-0310-b244-a6a79926bd2f
Jan Friesse 16 years ago
parent
commit
53bf62fd04
1 changed files with 2 additions and 0 deletions
  1. 2 0
      include/corosync/hdb.h

+ 2 - 0
include/corosync/hdb.h

@@ -333,6 +333,8 @@ static inline int hdb_handle_refcount_get (
 
 	int refcount = 0;
 
+	hdb_database_lock (&handle_database->lock);
+
 	if (handle >= handle_database->handle_count) {
 		hdb_database_unlock (&handle_database->lock);
 		errno = EBADF;