diff options
author | Jeffrey Burdges <burdges@gnunet.org> | 2017-06-05 19:19:37 +0200 |
---|---|---|
committer | Jeffrey Burdges <burdges@gnunet.org> | 2017-06-05 19:19:37 +0200 |
commit | 8f5ab32688caee1758056baa4e52a5a339b931e9 (patch) | |
tree | ed9d8c8bfefcded637531603a07b811a876932a7 /src/psycstore | |
parent | 57866fe5f37a8cf2d43f8839a2f2b18e986acb81 (diff) | |
download | gnunet-8f5ab32688caee1758056baa4e52a5a339b931e9.tar.gz gnunet-8f5ab32688caee1758056baa4e52a5a339b931e9.zip |
Fixes.
I left the ?? comments because someone should probably change
how return values are handled
Diffstat (limited to 'src/psycstore')
-rw-r--r-- | src/psycstore/plugin_psycstore_postgres.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/psycstore/plugin_psycstore_postgres.c b/src/psycstore/plugin_psycstore_postgres.c index fe0d53455..ef55736fb 100644 --- a/src/psycstore/plugin_psycstore_postgres.c +++ b/src/psycstore/plugin_psycstore_postgres.c | |||
@@ -1318,7 +1318,7 @@ state_get (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key, | |||
1318 | 1318 | ||
1319 | 1319 | ||
1320 | /** | 1320 | /** |
1321 | * Closure for #fragment_rows. | 1321 | * Closure for #get_state_cb. |
1322 | */ | 1322 | */ |
1323 | struct GetStateContext { | 1323 | struct GetStateContext { |
1324 | const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key; | 1324 | const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key; |
@@ -1345,7 +1345,8 @@ struct GetStateContext { | |||
1345 | * @param result the postgres result | 1345 | * @param result the postgres result |
1346 | * @param num_result the number of results in @a result | 1346 | * @param num_result the number of results in @a result |
1347 | */ | 1347 | */ |
1348 | void get_state (void *cls, | 1348 | static void |
1349 | get_state_cb (void *cls, | ||
1349 | PGresult *res, | 1350 | PGresult *res, |
1350 | unsigned int num_results) | 1351 | unsigned int num_results) |
1351 | { | 1352 | { |
@@ -1409,7 +1410,7 @@ state_get_prefix (void *cls, const struct GNUNET_CRYPTO_EddsaPublicKey *channel_ | |||
1409 | 1410 | ||
1410 | if (0 > GNUNET_PQ_eval_prepared_multi_select (plugin->dbh, | 1411 | if (0 > GNUNET_PQ_eval_prepared_multi_select (plugin->dbh, |
1411 | stmt, params_select, | 1412 | stmt, params_select, |
1412 | &get_state, &gsc)) | 1413 | &get_state_cb, &gsc)) |
1413 | return GNUNET_SYSERR; | 1414 | return GNUNET_SYSERR; |
1414 | return gsc.ret; /* GNUNET_OK ?? */ | 1415 | return gsc.ret; /* GNUNET_OK ?? */ |
1415 | } | 1416 | } |
@@ -1445,7 +1446,7 @@ state_get_signed (void *cls, | |||
1445 | 1446 | ||
1446 | if (0 > GNUNET_PQ_eval_prepared_multi_select (plugin->dbh, | 1447 | if (0 > GNUNET_PQ_eval_prepared_multi_select (plugin->dbh, |
1447 | stmt, params_select, | 1448 | stmt, params_select, |
1448 | &get_state, &gsc)) | 1449 | &get_state_cb, &gsc)) |
1449 | return GNUNET_SYSERR; | 1450 | return GNUNET_SYSERR; |
1450 | return gsc.ret; /* GNUNET_OK ?? */ | 1451 | return gsc.ret; /* GNUNET_OK ?? */ |
1451 | } | 1452 | } |