Skip to content

Commit

Permalink
lib/db: Deprecate db_get_login2() in favour of db_get_login().
Browse files Browse the repository at this point in the history
Signed-off-by: Mohan Yelugoti <ymdatta.work@gmail.com>
  • Loading branch information
ymdatta committed Sep 14, 2024
1 parent 9963fd0 commit b958c86
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/grass/defs/dbmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ int db_set_login2(const char *, const char *, const char *, const char *,
const char *, const char *, int);
int db_get_login(const char *, const char *, const char **, const char **,
const char **, const char **);
int db_get_login2(const char *, const char *, const char **, const char **,
const char **, const char **);
int db_get_login_dump(FILE *);

#endif
23 changes: 23 additions & 0 deletions lib/db/dbmi_base/login.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,29 @@ static int get_login(const char *driver, const char *database,
return DB_OK;
}

/*!
\brief Get login parameters for driver/database
If driver/database is not found, output arguments are set to NULL.
\deprecated Use db_get_login() instead.
\param driver driver name
\param database database name (can be NULL)
\param[out] user name
\param[out] password string
\param[out] host name
\param[out] port
\return DB_OK on success
\return DB_FAILED on failure
*/
int db_get_login2(const char *driver, const char *database, const char **user,
const char **password, const char **host, const char **port)
{
return db_get_login(driver, database, user, password, host, port);
}

/*!
\brief Get login parameters for driver/database
Expand Down

0 comments on commit b958c86

Please sign in to comment.