[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] 05/08: actually properly implement API wrt
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] 05/08: actually properly implement API wrt return value handling, even if not used today |
Date: |
Tue, 17 Oct 2017 19:53:54 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit 0346e37504745d75a6fc90c404d1c9400960af2a
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Oct 17 14:04:08 2017 +0200
actually properly implement API wrt return value handling, even if not used
today
---
src/exchangedb/exchangedb_auditorkeys.c | 36 ++++++++++++++++++++++++---------
1 file changed, 27 insertions(+), 9 deletions(-)
diff --git a/src/exchangedb/exchangedb_auditorkeys.c
b/src/exchangedb/exchangedb_auditorkeys.c
index 880e186..a84d060 100644
--- a/src/exchangedb/exchangedb_auditorkeys.c
+++ b/src/exchangedb/exchangedb_auditorkeys.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014, 2015, 2016 Inria & GNUnet e.V.
+ Copyright (C) 2014, 2015, 2016, 2017 Inria & GNUnet e.V.
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -40,6 +40,11 @@ struct AuditorIterateContext
* Closure for @e it.
*/
void *it_cls;
+
+ /**
+ * Status of the iteration.
+ */
+ int status;
};
@@ -94,6 +99,7 @@ auditor_iter (void *cls,
const char *auditor_url;
unsigned int dki_len;
size_t url_len;
+ int iret;
if (GNUNET_OK != GNUNET_DISK_file_size (filename,
&size,
@@ -160,14 +166,22 @@ auditor_iter (void *cls,
GNUNET_free (af);
return GNUNET_OK;
}
- /*Ignoring return value to not interrupt the iteration*/
- aic->it (aic->it_cls,
- &af->apub,
- auditor_url,
- &af->mpub,
- dki_len,
- sigs,
- dki);
+ /* Ignoring return value to not interrupt the iteration */
+ if (GNUNET_OK !=
+ (iret = aic->it (aic->it_cls,
+ &af->apub,
+ auditor_url,
+ &af->mpub,
+ dki_len,
+ sigs,
+ dki)))
+ {
+ GNUNET_free (af);
+ if (GNUNET_SYSERR == iret)
+ aic->status = GNUNET_SYSERR;
+ return GNUNET_SYSERR;
+ }
+ aic->status++;
GNUNET_free (af);
return GNUNET_OK;
}
@@ -201,10 +215,14 @@ TALER_EXCHANGEDB_auditor_iterate (const struct
GNUNET_CONFIGURATION_Handle *cfg,
return -1;
aic.it = it;
aic.it_cls = it_cls;
+ aic.status = 0;
ret = GNUNET_DISK_directory_scan (auditor_base_dir,
&auditor_iter,
&aic);
GNUNET_free (auditor_base_dir);
+ if ( (0 != aic.status) ||
+ (GNUNET_OK == ret) )
+ return aic.status;
return ret;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-exchange] branch master updated (eda7e1c -> 58528f3), gnunet, 2017/10/17
- [GNUnet-SVN] [taler-exchange] 01/08: assertion only holds if we did get results, gnunet, 2017/10/17
- [GNUnet-SVN] [taler-exchange] 03/08: make --wire argument mandatory, gnunet, 2017/10/17
- [GNUnet-SVN] [taler-exchange] 04/08: exit more nicely if command line arguments were wrong, gnunet, 2017/10/17
- [GNUnet-SVN] [taler-exchange] 08/08: update docs, gnunet, 2017/10/17
- [GNUnet-SVN] [taler-exchange] 05/08: actually properly implement API wrt return value handling, even if not used today,
gnunet <=
- [GNUnet-SVN] [taler-exchange] 06/08: report if DK lacks auditor signature, gnunet, 2017/10/17
- [GNUnet-SVN] [taler-exchange] 07/08: fix matching of auditor keys/denomination issues so that we return _all_ applicable auditor signatures, instead of a tiny subset, gnunet, 2017/10/17
- [GNUnet-SVN] [taler-exchange] 02/08: add JSON auditor output samples, gnunet, 2017/10/17