[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] 02/03: tolerate empty transaction list whe
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] 02/03: tolerate empty transaction list when returning history |
Date: |
Sun, 11 Jun 2017 17:04:58 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit ba17729f6568efab7cacfc292670169437cbbda8
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Jun 11 16:06:52 2017 +0200
tolerate empty transaction list when returning history
---
src/bank-lib/fakebank.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index 0b67b7f..037698c 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -521,7 +521,7 @@ handle_history (struct TALER_FAKEBANK_Handle *h,
else
pos = h->transactions_tail;
}
- else
+ else if (NULL != h->transactions_head)
{
for (pos = h->transactions_head;
NULL != pos;
@@ -539,6 +539,11 @@ handle_history (struct TALER_FAKEBANK_Handle *h,
if (count < 0)
pos = pos->prev;
}
+ else
+ {
+ /* list is empty */
+ pos = NULL;
+ }
history = json_array ();
while ( (NULL != pos) &&
(0 != count) )
--
To stop receiving notification emails like this one, please contact
address@hidden