commit b17c2d601cbcb877842bde0d8f7ae0c9cdacddc4
parent 9347f9ef1b267a53e32424127ac219db33ee6744
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 4 Dec 2019 13:12:38 +0100
clarify input
Diffstat:
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/main.c b/src/main.c
@@ -1318,6 +1318,10 @@ handle_command (const char *hex,
return;
if (0 != (hex_len % 2))
{
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Received unexpected input `%.*s'\n",
+ (int) hex_len,
+ hex);
GNUNET_break_op (0);
return;
}
@@ -1325,6 +1329,10 @@ handle_command (const char *hex,
"%2X",
&cmd))
{
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Received non-HEX input `%.*s'\n",
+ (int) hex_len,
+ hex);
GNUNET_break_op (0);
return;
}
@@ -1343,6 +1351,10 @@ handle_command (const char *hex,
"%2X",
&subcmd))
{
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Received non-HEX input `%.*s'\n",
+ (int) hex_len - 2,
+ &hex[2]);
GNUNET_break_op (0);
return;
}
@@ -1362,6 +1374,10 @@ handle_command (const char *hex,
"%4X",
&product))
{
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Received non-HEX input `%.*s'\n",
+ (int) hex_len - 8,
+ &hex[8]);
GNUNET_break_op (0);
return;
}