gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] branch master updated: fix sign issue of '


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: fix sign issue of 'start'
Date: Mon, 05 Jun 2017 18:37:17 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new ecaa766  fix sign issue of 'start'
ecaa766 is described below

commit ecaa7669e71339df9f06dbce5796240b12570317
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Jun 5 18:37:15 2017 +0200

    fix sign issue of 'start'
---
 src/backend/taler-merchant-httpd_history.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_history.c 
b/src/backend/taler-merchant-httpd_history.c
index 53a485b..4ad6a26 100644
--- a/src/backend/taler-merchant-httpd_history.c
+++ b/src/backend/taler-merchant-httpd_history.c
@@ -93,7 +93,7 @@ MH_handler_history (struct TMH_RequestHandler *rh,
   unsigned int ret;
   unsigned long long seconds;
   struct MerchantInstance *mi;
-  unsigned int start = UINT_MAX;
+  int start = -1;
   unsigned int delta;
 
   response = json_array ();
@@ -171,7 +171,8 @@ MH_handler_history (struct TMH_RequestHandler *rh,
                                      "start");
   if (NULL != str)
   {
-    if (1 != sscanf (str, "%u", &start))
+    if ( (1 != sscanf (str, "%d", &start)) ||
+         (0 > start) )
     {
       json_decref (response);
       return TMH_RESPONSE_reply_arg_invalid (connection,
@@ -208,7 +209,7 @@ MH_handler_history (struct TMH_RequestHandler *rh,
     ret = db->find_contract_terms_by_date_and_range (db->cls,
                                                      date,
                                                      &mi->pubkey,
-                                                     start,
+                                                     (unsigned int) start,
                                                      delta,
                                                      GNUNET_NO,
                                                      &pd_cb,

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]