mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-10 16:58:46 +01:00
add pgsql driver monitoring
SVN Revision: 1200
This commit is contained in:
parent
6737a9ff95
commit
c5d3974796
@ -1,3 +1,7 @@
|
|||||||
|
2008-02-19 Christophe Romain <christophe.romain@process-one.net>
|
||||||
|
|
||||||
|
* src/odbc/ejabberd_odbc.erl: add pgsql driver monitoring
|
||||||
|
|
||||||
2008-02-19 Mickael Remond <mremond@process-one.net>
|
2008-02-19 Mickael Remond <mremond@process-one.net>
|
||||||
|
|
||||||
* src/ejabberd_config.erl: dirty_get_registered_users now
|
* src/ejabberd_config.erl: dirty_get_registered_users now
|
||||||
|
@ -266,6 +266,7 @@ odbc_connect(SQLServer) ->
|
|||||||
pgsql_connect(Server, Port, DB, Username, Password) ->
|
pgsql_connect(Server, Port, DB, Username, Password) ->
|
||||||
case pgsql:connect(Server, DB, Username, Password, Port) of
|
case pgsql:connect(Server, DB, Username, Password, Port) of
|
||||||
{ok, Ref} ->
|
{ok, Ref} ->
|
||||||
|
erlang:monitor(process, Ref),
|
||||||
{ok, #state{db_ref = Ref, db_type = pgsql}};
|
{ok, #state{db_ref = Ref, db_type = pgsql}};
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
?ERROR_MSG("PostgreSQL connection failed: ~p~n", [Reason]),
|
?ERROR_MSG("PostgreSQL connection failed: ~p~n", [Reason]),
|
||||||
|
Loading…
Reference in New Issue
Block a user