Skip to content

Commit b958c86

Browse files
committed
lib/db: Deprecate db_get_login2() in favour of db_get_login().
Signed-off-by: Mohan Yelugoti <[email protected]>
1 parent 9963fd0 commit b958c86

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

include/grass/defs/dbmi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,8 @@ int db_set_login2(const char *, const char *, const char *, const char *,
391391
const char *, const char *, int);
392392
int db_get_login(const char *, const char *, const char **, const char **,
393393
const char **, const char **);
394+
int db_get_login2(const char *, const char *, const char **, const char **,
395+
const char **, const char **);
394396
int db_get_login_dump(FILE *);
395397

396398
#endif

lib/db/dbmi_base/login.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,29 @@ static int get_login(const char *driver, const char *database,
341341
return DB_OK;
342342
}
343343

344+
/*!
345+
\brief Get login parameters for driver/database
346+
347+
If driver/database is not found, output arguments are set to NULL.
348+
349+
\deprecated Use db_get_login() instead.
350+
351+
\param driver driver name
352+
\param database database name (can be NULL)
353+
\param[out] user name
354+
\param[out] password string
355+
\param[out] host name
356+
\param[out] port
357+
358+
\return DB_OK on success
359+
\return DB_FAILED on failure
360+
*/
361+
int db_get_login2(const char *driver, const char *database, const char **user,
362+
const char **password, const char **host, const char **port)
363+
{
364+
return db_get_login(driver, database, user, password, host, port);
365+
}
366+
344367
/*!
345368
\brief Get login parameters for driver/database
346369

0 commit comments

Comments
 (0)