diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-17 19:55:13 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-17 19:55:13 +0000 |
commit | 78e4d67de40513659c205c3e675304aa5274f43d (patch) | |
tree | 0d0e95ac218ac5086718976b8671fac14f68b497 /src/namestore | |
parent | ebc0782ab6900a3f24aac81dfd124af365bcb983 (diff) | |
download | gnunet-78e4d67de40513659c205c3e675304aa5274f43d.tar.gz gnunet-78e4d67de40513659c205c3e675304aa5274f43d.zip |
-fix #3220: typo in SQL
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/plugin_namestore_postgres.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c index cf52e0bac..7bf7bef02 100644 --- a/src/namestore/plugin_namestore_postgres.c +++ b/src/namestore/plugin_namestore_postgres.c | |||
@@ -60,6 +60,9 @@ | |||
60 | struct Plugin | 60 | struct Plugin |
61 | { | 61 | { |
62 | 62 | ||
63 | /** | ||
64 | * Our configuration. | ||
65 | */ | ||
63 | const struct GNUNET_CONFIGURATION_Handle *cfg; | 66 | const struct GNUNET_CONFIGURATION_Handle *cfg; |
64 | 67 | ||
65 | /** | 68 | /** |
@@ -100,7 +103,7 @@ create_indices (PGconn * dbh) | |||
100 | * as needed as well). | 103 | * as needed as well). |
101 | * | 104 | * |
102 | * @param plugin the plugin context (state for this module) | 105 | * @param plugin the plugin context (state for this module) |
103 | * @return GNUNET_OK on success | 106 | * @return #GNUNET_OK on success |
104 | */ | 107 | */ |
105 | static int | 108 | static int |
106 | database_setup (struct Plugin *plugin) | 109 | database_setup (struct Plugin *plugin) |
@@ -173,7 +176,7 @@ database_setup (struct Plugin *plugin) | |||
173 | (GNUNET_OK != | 176 | (GNUNET_OK != |
174 | GNUNET_POSTGRES_prepare (plugin->dbh, | 177 | GNUNET_POSTGRES_prepare (plugin->dbh, |
175 | "iterate_zone", | 178 | "iterate_zone", |
176 | "SELECT record_count, record_data, label FROM ns097records" | 179 | "SELECT record_count,record_data,label FROM ns097records" |
177 | " WHERE zone_private_key=$1 ORDER BY rvalue LIMIT 1 OFFSET $2", 2)) || | 180 | " WHERE zone_private_key=$1 ORDER BY rvalue LIMIT 1 OFFSET $2", 2)) || |
178 | (GNUNET_OK != | 181 | (GNUNET_OK != |
179 | GNUNET_POSTGRES_prepare (plugin->dbh, | 182 | GNUNET_POSTGRES_prepare (plugin->dbh, |
@@ -182,9 +185,9 @@ database_setup (struct Plugin *plugin) | |||
182 | " FROM ns097records ORDER BY rvalue LIMIT 1 OFFSET $1", 1)) || | 185 | " FROM ns097records ORDER BY rvalue LIMIT 1 OFFSET $1", 1)) || |
183 | (GNUNET_OK != | 186 | (GNUNET_OK != |
184 | GNUNET_POSTGRES_prepare (plugin->dbh, | 187 | GNUNET_POSTGRES_prepare (plugin->dbh, |
185 | "lookup_label", | 188 | "lookup_label", |
186 | "SELECT record_count,record_data,label,zone_private_key" | 189 | "SELECT record_count,record_data,label" |
187 | " FROM ns097records WHERE records zone_private_key=$1 AND label=$2", 2))) | 190 | " FROM ns097records WHERE zone_private_key=$1 AND label=$2", 2))) |
188 | { | 191 | { |
189 | PQfinish (plugin->dbh); | 192 | PQfinish (plugin->dbh); |
190 | plugin->dbh = NULL; | 193 | plugin->dbh = NULL; |
@@ -387,8 +390,10 @@ get_record_and_call_iterator (struct Plugin *plugin, | |||
387 | */ | 390 | */ |
388 | static int | 391 | static int |
389 | namestore_postgres_lookup_records (void *cls, | 392 | namestore_postgres_lookup_records (void *cls, |
390 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, const char *label, | 393 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
391 | GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) | 394 | const char *label, |
395 | GNUNET_NAMESTORE_RecordIterator iter, | ||
396 | void *iter_cls) | ||
392 | { | 397 | { |
393 | struct Plugin *plugin = cls; | 398 | struct Plugin *plugin = cls; |
394 | const char *paramValues[] = { | 399 | const char *paramValues[] = { |
@@ -535,7 +540,7 @@ database_shutdown (struct Plugin *plugin) | |||
535 | /** | 540 | /** |
536 | * Entry point for the plugin. | 541 | * Entry point for the plugin. |
537 | * | 542 | * |
538 | * @param cls the "struct GNUNET_NAMESTORE_PluginEnvironment*" | 543 | * @param cls the `struct GNUNET_NAMESTORE_PluginEnvironment*` |
539 | * @return NULL on error, othrewise the plugin context | 544 | * @return NULL on error, othrewise the plugin context |
540 | */ | 545 | */ |
541 | void * | 546 | void * |