From 82dc45f5117a531f988457f956da885c5c823c24 Mon Sep 17 00:00:00 2001 From: gardners Date: Thu, 9 May 2013 21:07:42 +0930 Subject: [PATCH] output of meshms thread list now conforms to cli_* interface. --- meshms.c | 22 ++++++++++++++++------ rhizome.h | 2 +- serialization_meshms.c | 19 +++++++++---------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/meshms.c b/meshms.c index 20230785..61f72aaf 100644 --- a/meshms.c +++ b/meshms.c @@ -286,7 +286,7 @@ int app_meshms_read_messagelog(const struct cli_parsed *parsed, void *context) ret = meshms_read_message(m,buffer_file); //hex_dump(buffer_file,buffer_length); int offset_buffer = 0; - ret = deserialize_meshms(buffer_file,&offset_buffer,buffer_length); + ret = deserialize_meshms(buffer_file,&offset_buffer,buffer_length,"unknown"); @@ -433,16 +433,26 @@ int app_meshms_list_messages(const struct cli_parsed *parsed, void *context) } // Display list of messages in reverse order + const char *names[]={ + "offset", + "length", + "sender", + "recipient", + "date", + "delivery_status", + "message" + }; + cli_columns(7, names); + int i; for(i=message_count-1;i>=0;i--) { - DEBUGF("%s : %s : 0x%08x", - sides[i]?"right":" left", - sides[i]?"Received":((offsets[i]