summaryrefslogtreecommitdiff
path: root/src/util/wireformats.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-18 18:53:12 +0200
committerChristian Grothoff <christian@grothoff.org>2015-05-18 18:53:12 +0200
commit7b4623706c3a87b444362ca27027d9bfb1aa25ae (patch)
treee546a3407f4465be9110fffeaab3ae38c5f8c3b2 /src/util/wireformats.c
parentcb68cc7e5b03a03f335e121def044034978adf17 (diff)
parent17985453c560300dba044617bafdb8f682d29e4c (diff)
downloadexchange-7b4623706c3a87b444362ca27027d9bfb1aa25ae.tar.gz
exchange-7b4623706c3a87b444362ca27027d9bfb1aa25ae.tar.bz2
exchange-7b4623706c3a87b444362ca27027d9bfb1aa25ae.zip
Merge branch 'master' of git+ssh://taler.net/var/git/mint
Diffstat (limited to 'src/util/wireformats.c')
-rw-r--r--src/util/wireformats.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/util/wireformats.c b/src/util/wireformats.c
index df32f2d3d..7ea4fd067 100644
--- a/src/util/wireformats.c
+++ b/src/util/wireformats.c
@@ -22,7 +22,6 @@
#include "platform.h"
#include <gnunet/gnunet_util_lib.h>
#include "taler_util.h"
-#include "taler_json_lib.h"
/**
* Shorthand for exit jumps.
@@ -298,10 +297,11 @@ validate_iban (const char *iban)
dividend += remainder * (pow (10, nread));
remainder = dividend % 97;
}
- EXITIF (1 != remainder);
- GNUNET_free (nbuf);
- return GNUNET_YES;
-
+ if (1 == remainder)
+ {
+ GNUNET_free (nbuf);
+ return GNUNET_YES;
+ }
EXITIF_exit:
GNUNET_free (nbuf);
return GNUNET_NO;
@@ -346,7 +346,13 @@ validate_sepa (const json_t *wire)
"r", &r,
"address", &address));
EXITIF (0 != strcmp (type, "SEPA"));
- EXITIF (1 != validate_iban (iban));
+ if (1 != validate_iban (iban))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "IBAN `%s' invalid\n",
+ iban);
+ return GNUNET_NO;
+ }
return GNUNET_YES;
EXITIF_exit:
return GNUNET_NO;
@@ -394,7 +400,7 @@ TALER_json_validate_wireformat (const char *type,
if (0 == strcasecmp (format_handlers[i].type,
type))
return format_handlers[i].handler (wire);
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Wireformat `%s' not supported\n",
type);
return GNUNET_NO;