From 77c5000dad6154231fa2b9eb59d77f3187670800 Mon Sep 17 00:00:00 2001 From: Daniel Swarbrick Date: Thu, 4 Aug 2011 20:17:15 +0200 Subject: [PATCH] add message_len to output of vm_list api command --- src/mod/applications/mod_voicemail/mod_voicemail.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mod/applications/mod_voicemail/mod_voicemail.c b/src/mod/applications/mod_voicemail/mod_voicemail.c index 1ce5ecccd1..2eb89ebc43 100644 --- a/src/mod/applications/mod_voicemail/mod_voicemail.c +++ b/src/mod/applications/mod_voicemail/mod_voicemail.c @@ -4318,7 +4318,7 @@ static int api_list_callback(void *pArg, int argc, char **argv, char **columnNam { switch_stream_handle_t *stream = (switch_stream_handle_t *) pArg; - if (!strcasecmp(argv[9], "xml")) { + if (!strcasecmp(argv[10], "xml")) { stream->write_function(stream, " \n"); stream->write_function(stream, " %s\n", argv[0]); stream->write_function(stream, " %s\n", argv[1]); @@ -4329,9 +4329,10 @@ static int api_list_callback(void *pArg, int argc, char **argv, char **columnNam stream->write_function(stream, " %s\n", argv[6]); stream->write_function(stream, " %s\n", argv[7]); stream->write_function(stream, " %s\n", argv[8]); + stream->write_function(stream, " %s\n", argv[9]); stream->write_function(stream, " \n"); } else { - stream->write_function(stream, "%s:%s:%s:%s:%s:%s:%s:%s:%s\n", argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]); + stream->write_function(stream, "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s\n", argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]); } return 0; @@ -4375,11 +4376,11 @@ SWITCH_STANDARD_API(voicemail_list_api_function) if (id && domain && profile_name && (profile = get_profile(profile_name))) { if (uuid) { - sql = switch_mprintf("select created_epoch, read_epoch, username, domain, in_folder, file_path, uuid, cid_name, cid_number, " + sql = switch_mprintf("select created_epoch, read_epoch, username, domain, in_folder, file_path, uuid, cid_name, cid_number, message_len, " "'%q' from voicemail_msgs where username='%q' and domain='%q' and uuid='%q'", format, id, domain, uuid); } else { - sql = switch_mprintf("select created_epoch, read_epoch, username, domain, in_folder, file_path, uuid, cid_name, cid_number, " + sql = switch_mprintf("select created_epoch, read_epoch, username, domain, in_folder, file_path, uuid, cid_name, cid_number, message_len, " "'%q' from voicemail_msgs where username='%q' and domain='%q'", format, id, domain); }