git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74145 15284696-431f-4ddb-bdfa-cd5b030d7da7
@@ -8,12 +8,6 @@ char *get_datasource_name(const char *opt_dsn, int use_ogr)
{
char *dsn;
- dsn = G_store(opt_dsn);
-
- return dsn;
- /* OGR dsn and GRASS db connections are independent of each other */
if (G_strncasecmp(opt_dsn, "PG:", 3) == 0) {
/* PostgreSQL/PostGIS */
size_t i;
@@ -101,12 +101,8 @@ int main(int argc, char *argv[])
}
dsn = NULL;
- /* disabling GRASS-PostGIS driver:
- * TODO: a new fn that converts OGR dsn to PQ connection info,
- * ignoring current GRASS db connection */
- use_ogr = TRUE;
if (options.dsn->answer)
- dsn = G_store(options.dsn->answer);
+ dsn = get_datasource_name(options.dsn->answer, use_ogr);
if (flags.list->answer || flags.tlist->answer) {
/* list layers */