[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] branch master updated: do not cut out &sta
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] branch master updated: do not cut out &start= post-hum, just build the string right the first time |
Date: |
Mon, 03 Jun 2019 00:26:55 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 7d142ad2 do not cut out &start= post-hum, just build the string right
the first time
7d142ad2 is described below
commit 7d142ad261ca92930d055b836747264212fcfffe
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Jun 3 00:26:53 2019 +0200
do not cut out &start= post-hum, just build the string right the first time
---
src/bank-lib/bank_api_history.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/bank-lib/bank_api_history.c b/src/bank-lib/bank_api_history.c
index 53c381f6..2520fa16 100644
--- a/src/bank-lib/bank_api_history.c
+++ b/src/bank-lib/bank_api_history.c
@@ -482,21 +482,23 @@ TALER_BANK_history (struct GNUNET_CURL_Context *ctx,
return NULL;
}
- GNUNET_asprintf (&url,
-
"/history?auth=basic&account_number=%llu&delta=%lld&direction=%s&cancelled=%s&ordering=%s&start=%llu",
+ if (UINT64_MAX == start_row)
+ GNUNET_asprintf (&url,
+
"/history?auth=basic&account_number=%llu&delta=%lld&direction=%s&cancelled=%s&ordering=%s",
(unsigned long long) account_number,
(long long) num_results,
conv_direction (direction).value,
conv_cancel (direction).value,
- (GNUNET_YES == ascending) ? "ascending" : "descending",
- start_row);
-
- /* Locate and "cut" the 'start' argument,
- * if the user didn't provide one. */
- if (UINT64_MAX == start_row)
- *strstr (url,
- "&start=") = '\0';
-
+ (GNUNET_YES == ascending) ? "ascending" : "descending");
+ else
+ GNUNET_asprintf (&url,
+
"/history?auth=basic&account_number=%llu&delta=%lld&direction=%s&cancelled=%s&ordering=%s&start=%llu",
+ (unsigned long long) account_number,
+ (long long) num_results,
+ conv_direction (direction).value,
+ conv_cancel (direction).value,
+ (GNUNET_YES == ascending) ? "ascending" : "descending",
+ start_row);
hh = put_history_job (ctx,
bank_base_url,
url,
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-exchange] branch master updated: do not cut out &start= post-hum, just build the string right the first time,
gnunet <=