diff options
Diffstat (limited to 'src/identity-provider/plugin_identity_provider_sqlite.c')
-rw-r--r-- | src/identity-provider/plugin_identity_provider_sqlite.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/identity-provider/plugin_identity_provider_sqlite.c b/src/identity-provider/plugin_identity_provider_sqlite.c index f31e2e68a..464ea29cb 100644 --- a/src/identity-provider/plugin_identity_provider_sqlite.c +++ b/src/identity-provider/plugin_identity_provider_sqlite.c | |||
@@ -376,7 +376,28 @@ identity_provider_sqlite_store_ticket (void *cls, | |||
376 | attribute_list_serialize (attrs, | 376 | attribute_list_serialize (attrs, |
377 | attrs_serialized); | 377 | attrs_serialized); |
378 | 378 | ||
379 | { | 379 | { |
380 | /* First delete duplicates */ | ||
381 | struct GNUNET_SQ_QueryParam dparams[] = { | ||
382 | GNUNET_SQ_query_param_auto_from_type (&ticket->identity), | ||
383 | GNUNET_SQ_query_param_uint64 (&ticket->rnd), | ||
384 | GNUNET_SQ_query_param_end | ||
385 | }; | ||
386 | if (GNUNET_OK != | ||
387 | GNUNET_SQ_bind (plugin->delete_ticket, | ||
388 | dparams)) | ||
389 | { | ||
390 | LOG_SQLITE (plugin, | ||
391 | GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, | ||
392 | "sqlite3_bind_XXXX"); | ||
393 | GNUNET_SQ_reset (plugin->dbh, | ||
394 | plugin->delete_ticket); | ||
395 | return GNUNET_SYSERR; | ||
396 | } | ||
397 | n = sqlite3_step (plugin->delete_ticket); | ||
398 | GNUNET_SQ_reset (plugin->dbh, | ||
399 | plugin->delete_ticket); | ||
400 | |||
380 | struct GNUNET_SQ_QueryParam sparams[] = { | 401 | struct GNUNET_SQ_QueryParam sparams[] = { |
381 | GNUNET_SQ_query_param_auto_from_type (&ticket->identity), | 402 | GNUNET_SQ_query_param_auto_from_type (&ticket->identity), |
382 | GNUNET_SQ_query_param_auto_from_type (&ticket->audience), | 403 | GNUNET_SQ_query_param_auto_from_type (&ticket->audience), |