[Ida-cvs] avapd/src database.c,1.31,1.32
Status: Pre-Alpha
Brought to you by:
alexanderb
From: Alexander B. <ale...@us...> - 2004-12-31 19:50:09
|
Update of /cvsroot/ida/avapd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11951/src Modified Files: database.c Log Message: - added reporting of trouble when connecting to a PSQL host Index: database.c =================================================================== RCS file: /cvsroot/ida/avapd/src/database.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** database.c 29 Dec 2004 01:58:54 -0000 1.31 --- database.c 31 Dec 2004 19:49:58 -0000 1.32 *************** *** 151,154 **** --- 151,155 ---- if(PQresultStatus(result) != PGRES_TUPLES_OK) { PQclear(result); + PQfinish(conn); log_printf(WARN, "Error: No Song-Table found in Database \"%s\"!\n", config.dbname); return -1; *************** *** 157,160 **** --- 158,162 ---- // TODO: check for movie table + PQclear(result); PQfinish(conn); return 0; *************** *** 456,460 **** PGconn *conn = PQconnectdb(request); if (PQstatus(conn) == CONNECTION_BAD) ! log_printf(ERROR, "Error: Can't connect to SQL-Host \"%s\": %s", request, PQerrorMessage(conn)); #ifdef DEBUG else --- 458,463 ---- PGconn *conn = PQconnectdb(request); if (PQstatus(conn) == CONNECTION_BAD) ! log_printf(ERROR, "Error: Connecting to SQL server on %s: %s", ! !config.psql_host ? "localhost" : config.psql_host, PQerrorMessage(conn)); #ifdef DEBUG else |