From da83ab57dc6023795dd673117e3f294950a1112b Mon Sep 17 00:00:00 2001 From: gardners Date: Thu, 9 May 2013 22:13:11 +0930 Subject: [PATCH] pruned out deprecated meshms messagelog command. --- commandline.c | 3 --- meshms.c | 65 --------------------------------------------------- serval.h | 1 - 3 files changed, 69 deletions(-) diff --git a/commandline.c b/commandline.c index 583d4fb2..c7a06987 100644 --- a/commandline.c +++ b/commandline.c @@ -2360,9 +2360,6 @@ struct cli_schema command_line_options[]={ "Get specified configuration variable."}, {app_vomp_console,{"console",NULL},0, "Test phone call life-cycle from the console"}, - {app_meshms_read_messagelog,{"meshms","read", "messagelog" KEYRING_PIN_OPTIONS, - "[]",NULL},CLIFLAG_STANDALONE, - "List messages between a sender and a recipient"}, {app_meshms_list_messages,{"meshms","list","messages" KEYRING_PIN_OPTIONS, "","",NULL},CLIFLAG_STANDALONE, "Create a MeshMS from to "}, {app_meshms_add_message,{"meshms","add","message" KEYRING_PIN_OPTIONS, "[]","[]","","","",NULL},CLIFLAG_STANDALONE, diff --git a/meshms.c b/meshms.c index 95e1d0fb..7d22b580 100644 --- a/meshms.c +++ b/meshms.c @@ -228,71 +228,6 @@ int meshms_append_messageblock(const char *sender_sid, return ret ; } -int app_meshms_read_messagelog(const struct cli_parsed *parsed, void *context) -{ - if (config.debug.verbose) - DEBUG_cli_parsed(parsed); - - int ret; - const char *manifestid=NULL; - - if (cli_arg(parsed, "manifestid", &manifestid, cli_manifestid, "") == -1 ) - return -1; - - if (create_serval_instance_dir() == -1) - return -1; - if (!(keyring = keyring_open_instance_cli(parsed))) - return -1; - if (rhizome_opendb() == -1) - return -1; - - ret=0; - - unsigned char manifest_id[RHIZOME_MANIFEST_ID_BYTES]; - if (fromhexstr(manifest_id, manifestid, RHIZOME_MANIFEST_ID_BYTES) == -1) - return WHY("Invalid manifest ID"); - - char manifestIdUpper[RHIZOME_MANIFEST_ID_STRLEN + 1]; - tohex(manifestIdUpper, manifest_id, RHIZOME_MANIFEST_ID_BYTES); - - rhizome_manifest *m = rhizome_new_manifest(); - if (!m) - return WHY("Manifest struct could not be allocated -- not added to rhizome"); - - ret = rhizome_retrieve_manifest(manifestIdUpper, m); - - if (ret==0){ - // ignore errors - rhizome_extract_privatekey(m, NULL); - const char *blob_service = rhizome_manifest_get(m, "service", NULL, 0); - cli_puts("service"); cli_delim(":"); cli_puts(blob_service); cli_delim("\n"); - cli_puts("manifestid"); cli_delim(":"); cli_puts(manifestIdUpper); cli_delim("\n"); - cli_puts("version"); cli_delim(":"); cli_printf("%lld", m->version); cli_delim("\n"); - cli_puts("inserttime"); cli_delim(":"); cli_printf("%lld", m->inserttime); cli_delim("\n"); - if (m->haveSecret) { - cli_puts(".author"); cli_delim(":"); cli_puts(alloca_tohex_sid(m->author)); cli_delim("\n"); - } - cli_puts(".readonly"); cli_delim(":"); cli_printf("%d", m->haveSecret?0:1); cli_delim("\n"); - cli_puts("filesize"); cli_delim(":"); cli_printf("%lld", (long long) m->fileLength); cli_delim("\n"); - if (m->fileLength != 0) { - cli_puts("filehash"); cli_delim(":"); cli_puts(m->fileHexHash); cli_delim("\n"); - } - } - - unsigned char *buffer_file; - buffer_file=malloc(m->fileLength); - int buffer_length=m->fileLength; - - ret = meshms_read_message(m,buffer_file); - //hex_dump(buffer_file,buffer_length); - int offset_buffer = 0; - ret = deserialize_meshms(0,buffer_file,&offset_buffer,buffer_length,"unknown"); - - free(buffer_file); - return ret; - -} - int app_meshms_list_messages(const struct cli_parsed *parsed, void *context) { if (create_serval_instance_dir() == -1) diff --git a/serval.h b/serval.h index 0ac1138d..517da1f6 100644 --- a/serval.h +++ b/serval.h @@ -717,7 +717,6 @@ int app_pa_phone(const struct cli_parsed *parsed, void *context); int app_monitor_cli(const struct cli_parsed *parsed, void *context); int app_vomp_console(const struct cli_parsed *parsed, void *context); -int app_meshms_read_messagelog(const struct cli_parsed *parsed, void *context); int app_meshms_add_message(const struct cli_parsed *parsed, void *context); int app_meshms_list_messages(const struct cli_parsed *parsed, void *context);