Fix crash when connection to postgres fails, backported from upstream
git commit c3d5d52ad084a98cc161. From Piotr Sikora, thanks!
This commit is contained in:
parent
2fbe435e12
commit
63fd810c25
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.7 2011/03/20 09:19:25 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.8 2011/04/03 09:04:54 landry Exp $
|
||||
|
||||
COMMENT = mail server storing messages in a database
|
||||
|
||||
DISTNAME = archiveopteryx-3.1.3
|
||||
REVISION = 3
|
||||
REVISION = 4
|
||||
CATEGORIES = mail databases
|
||||
|
||||
HOMEPAGE = http://www.archiveopteryx.org/
|
||||
|
14
mail/archiveopteryx/patches/patch-db_database_cpp
Normal file
14
mail/archiveopteryx/patches/patch-db_database_cpp
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-db_database_cpp,v 1.1 2011/04/03 09:04:54 landry Exp $
|
||||
Backport c3d5d52ad084a98cc161
|
||||
Fix crash when connection to postgres fails.
|
||||
--- db/database.cpp.orig
|
||||
+++ db/database.cpp
|
||||
@@ -339,6 +339,8 @@ void Database::removeHandle( Database * d )
|
||||
return;
|
||||
|
||||
handles->remove( d );
|
||||
+ if ( !totalDbConnections )
|
||||
+ totalDbConnections = new GraphableNumber( "total-db-connections" );
|
||||
totalDbConnections->setValue( handles->count() );
|
||||
if ( !handles->isEmpty() )
|
||||
return;
|
Loading…
Reference in New Issue
Block a user