pruned out deprecated meshms messagelog command.

This commit is contained in:
gardners 2013-05-09 22:13:11 +09:30
parent 6578f3e630
commit da83ab57dc
3 changed files with 0 additions and 69 deletions

View File

@ -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,
"[<manifestid>]",NULL},CLIFLAG_STANDALONE,
"List messages between a sender and a recipient"},
{app_meshms_list_messages,{"meshms","list","messages" KEYRING_PIN_OPTIONS, "<sender_sid>","<recipient_sid>",NULL},CLIFLAG_STANDALONE,
"Create a MeshMS from <sender_sid> to <recipient_sid>"},
{app_meshms_add_message,{"meshms","add","message" KEYRING_PIN_OPTIONS, "[<sender_did>]","[<recipient_did>]","<sender_sid>","<recipient_sid>","<payload>",NULL},CLIFLAG_STANDALONE,

View File

@ -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)

View File

@ -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);