summaryrefslogtreecommitdiff
path: root/src/wire/plugin_wire_test.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-01-25 11:09:55 +0100
committerChristian Grothoff <christian@grothoff.org>2016-01-25 11:09:55 +0100
commit9b4a9cde8717d053706a2df94c38e19e97eef8ee (patch)
treea16ab8488ba92e51f95f156da3dff4dbc908112a /src/wire/plugin_wire_test.c
parentccb4ac92a3e69d26e6c04b10b407f5491eda7001 (diff)
downloadexchange-9b4a9cde8717d053706a2df94c38e19e97eef8ee.tar.gz
exchange-9b4a9cde8717d053706a2df94c38e19e97eef8ee.tar.bz2
exchange-9b4a9cde8717d053706a2df94c38e19e97eef8ee.zip
test wire formats before using
Diffstat (limited to 'src/wire/plugin_wire_test.c')
-rw-r--r--src/wire/plugin_wire_test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c
index 917cf09b6..776b786e7 100644
--- a/src/wire/plugin_wire_test.c
+++ b/src/wire/plugin_wire_test.c
@@ -288,6 +288,12 @@ test_prepare_wire_transfer (void *cls,
struct TestClosure *tc = cls;
struct TALER_WIRE_PrepareHandle *pth;
+ if (GNUNET_YES !=
+ test_wire_validate (wire))
+ {
+ GNUNET_break (0);
+ return NULL;
+ }
pth = GNUNET_new (struct TALER_WIRE_PrepareHandle);
pth->tc = tc;
pth->wire = (json_t *) wire;
@@ -372,6 +378,8 @@ test_execute_wire_transfer (void *cls,
/* FIXME: deserialize buf */
wire = NULL;
+ GNUNET_assert (GNUNET_YES ==
+ test_wire_validate (wire));
eh = GNUNET_new (struct TALER_WIRE_ExecuteHandle);
eh->cc = cc;
eh->cc_cls = cc_cls;