Revert "errormsg may be NULL"
authorAlan T. DeKok <aland@freeradius.org>
Sun, 22 Nov 2009 08:12:15 +0000 (09:12 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 22 Nov 2009 15:36:15 +0000 (16:36 +0100)
This reverts commit 45877bf44b02d418b6fb263a39e5de07ced58b6e.

It doesn't fix the problem, and it seems to cause issues for
other people

src/modules/rlm_sql/drivers/rlm_sql_postgresql/sql_postgresql.c

index 22c045f..21f4850 100644 (file)
@@ -275,9 +275,6 @@ static int sql_query(SQLSOCK * sqlsocket, SQL_CONFIG *config, char *querystr) {
 
                                errorcode = PQresultErrorField(pg_sock->result, PG_DIAG_SQLSTATE);
                                errormsg  = PQresultErrorField(pg_sock->result, PG_DIAG_MESSAGE_PRIMARY);
-
-                               if (!errormsg) errormsg = "FATAL ERROR";
-
                                radlog(L_DBG, "rlm_sql_postgresql: Error %s", errormsg);
                                return check_fatal_error(errorcode);
 #endif