summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bb6d622)
raw | patch | inline | side by side (parent: bb6d622)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 26 Aug 2008 14:07:48 +0000 (16:07 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Tue, 26 Aug 2008 17:09:09 +0000 (19:09 +0200) |
The latter name includes the type (string) of the data being handled and,
thus, allows functions handling other types to be named in a consistent way.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
thus, allows functions handling other types to be named in a consistent way.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/postgresql.c | patch | blob | history |
diff --git a/src/postgresql.c b/src/postgresql.c
index fbc117b09547349bd623a4cb843abdf588014370..ed55ee7e51316a59e9d797632aee4e98d8bcd200 100644 (file)
--- a/src/postgresql.c
+++ b/src/postgresql.c
return 0;
} /* c_psql_init */
-static int config_set (char *name, char **var, const oconfig_item_t *ci)
+static int config_set_s (char *name, char **var, const oconfig_item_t *ci)
{
if ((0 != ci->children_num) || (1 != ci->values_num)
|| (OCONFIG_TYPE_STRING != ci->values[0].type)) {
sfree (*var);
*var = sstrdup (ci->values[0].value.string);
return 0;
-} /* config_set */
+} /* config_set_s */
static int config_set_param (c_psql_query_t *query, const oconfig_item_t *ci)
{
oconfig_item_t *c = ci->children + i;
if (0 == strcasecmp (c->key, "Query"))
- config_set ("Query", &query->query, c);
+ config_set_s ("Query", &query->query, c);
else if (0 == strcasecmp (c->key, "Param"))
config_set_param (query, c);
else if (0 == strcasecmp (c->key, "Column"))
oconfig_item_t *c = ci->children + i;
if (0 == strcasecmp (c->key, "Host"))
- config_set ("Host", &db->host, c);
+ config_set_s ("Host", &db->host, c);
else if (0 == strcasecmp (c->key, "Port"))
- config_set ("Port", &db->port, c);
+ config_set_s ("Port", &db->port, c);
else if (0 == strcasecmp (c->key, "User"))
- config_set ("User", &db->user, c);
+ config_set_s ("User", &db->user, c);
else if (0 == strcasecmp (c->key, "Password"))
- config_set ("Password", &db->password, c);
+ config_set_s ("Password", &db->password, c);
else if (0 == strcasecmp (c->key, "SSLMode"))
- config_set ("SSLMode", &db->sslmode, c);
+ config_set_s ("SSLMode", &db->sslmode, c);
else if (0 == strcasecmp (c->key, "KRBSrvName"))
- config_set ("KRBSrvName", &db->krbsrvname, c);
+ config_set_s ("KRBSrvName", &db->krbsrvname, c);
else if (0 == strcasecmp (c->key, "Service"))
- config_set ("Service", &db->service, c);
+ config_set_s ("Service", &db->service, c);
else if (0 == strcasecmp (c->key, "Query"))
config_set_query (db, c);
else