check type in plugin
This commit is contained in:
parent
fc57913530
commit
936acfa131
@ -385,6 +385,14 @@ sepa_wire_validate (const json_t *wire)
|
||||
TALER_json_warn (error);
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
if (0 != strcasecmp (type,
|
||||
"sepa"))
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
"Transfer type `%s' invalid\n",
|
||||
type);
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
if (1 != validate_iban (iban))
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||
|
@ -130,7 +130,7 @@ main(int argc,
|
||||
GNUNET_assert (NULL != plugin);
|
||||
(void) memset(&error, 0, sizeof(error));
|
||||
GNUNET_assert (NULL != (wire = json_loads (unsupported_wire_str, 0, NULL)));
|
||||
GNUNET_assert (GNUNET_NO == plugin->wire_validate (wire));
|
||||
GNUNET_assert (GNUNET_YES != plugin->wire_validate (wire));
|
||||
json_decref (wire);
|
||||
GNUNET_assert (NULL != (wire = json_loads (invalid_wire_str, 0, NULL)));
|
||||
GNUNET_assert (GNUNET_NO == plugin->wire_validate (wire));
|
||||
|
Loading…
Reference in New Issue
Block a user