libgnunetchat

library for GNUnet Messenger
Log | Files | Refs | README | LICENSE

commit 4afe022f190cfcdfbcf1813c2aad8f8f3cce27f9
parent d86c3a8e16476687b8c373e7ebd89c29b18fd58f
Author: Jacki <jacki@thejackimonster.de>
Date:   Thu, 22 Feb 2024 23:24:38 +0100

Add flag to ignore message targets of messages in debug tool

Signed-off-by: Jacki <jacki@thejackimonster.de>

Diffstat:
Mtools/gnunet_messenger_uml.c | 26+++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/tools/gnunet_messenger_uml.c b/tools/gnunet_messenger_uml.c @@ -55,6 +55,8 @@ struct GNUNET_MESSENGER_Tool char *ego_name; char *room_name; + int ignore_targets; + bool quit; }; @@ -260,17 +262,17 @@ message_callback (void *cls, ); } - if (GNUNET_MESSENGER_KIND_REQUEST == message->header.kind) - add_link(tool, hash, &(message->body.request.hash), true); - - if (GNUNET_MESSENGER_KIND_DELETE == message->header.kind) - add_link(tool, hash, &(message->body.deletion.hash), true); + if (0 == tool->ignore_targets) + { + if (GNUNET_MESSENGER_KIND_REQUEST == message->header.kind) + add_link(tool, hash, &(message->body.request.hash), true); - if (GNUNET_MESSENGER_KIND_REQUEST == message->header.kind) - add_link(tool, hash, &(message->body.request.hash), true); + if (GNUNET_MESSENGER_KIND_DELETE == message->header.kind) + add_link(tool, hash, &(message->body.deletion.hash), true); - if (GNUNET_MESSENGER_KIND_TAG == message->header.kind) - add_link(tool, hash, &(message->body.tag.hash), true); + if (GNUNET_MESSENGER_KIND_TAG == message->header.kind) + add_link(tool, hash, &(message->body.tag.hash), true); + } add_link(tool, hash, &(message->header.previous), false); @@ -384,6 +386,12 @@ main (int argc, "name of room to read messages from", &(tool.room_name) ), + GNUNET_GETOPT_option_flag( + 'i', + "ignore-targets", + "ignore indirect connections between messages and their targets", + &(tool.ignore_targets) + ), GNUNET_GETOPT_OPTION_END };