]> the.earth.li Git - onak.git/commitdiff
Fix compilation breakage with PostgreSQL backend
authorJonathan McDowell <noodles@earth.li>
Thu, 9 Jun 2016 14:35:09 +0000 (15:35 +0100)
committerJonathan McDowell <noodles@earth.li>
Thu, 9 Jun 2016 14:35:09 +0000 (15:35 +0100)
The migration to a specific backend database configuration structure
was incomplete for the PostgreSQL backend, causing compilation failures.

keydb_pg.c

index d599afecc97ee3012f1dd96294d78b2490eea6b7..e87d4f85d3c93bf51190aae44b382eae3e794970 100644 (file)
@@ -677,13 +677,13 @@ struct onak_dbctx *keydb_pg_init(struct onak_db_config *dbcfg, bool readonly)
        }
        dbctx->config = dbcfg;
 
-       dbconn = PQsetdbLogin(config.pg_dbhost, // host
+       dbconn = PQsetdbLogin(dbcfg->hostname, // host
                        NULL, // port
                        NULL, // options
                        NULL, // tty
-                       config.pg_dbname, // database
-                       config.pg_dbuser,  //login
-                       config.pg_dbpass); // password
+                       dbcfg->location, // database
+                       dbcfg->username,  //login
+                       dbcfg->password); // password
 
        if (PQstatus(dbconn) == CONNECTION_BAD) {
                logthing(LOGTHING_CRITICAL, "Connection to database failed.");