const char *context = a->argv[4];
struct ast_vm_mailbox_snapshot *mailbox_snapshot;
struct ast_vm_msg_snapshot *msg;
+ int i;
/* Take a snapshot of the mailbox and walk through each folder's contents */
mailbox_snapshot = ast_vm_mailbox_snapshot_create(mailbox, context, NULL, 0, AST_VM_SNAPSHOT_SORT_BY_ID, 0);
ast_cli(a->fd, VM_STRING_HEADER_FORMAT, "Folder", "Caller ID", "Date", "Duration", "Flag", "ID");
- for (int i = 0; i < mailbox_snapshot->folders; i++) {
+ for (i = 0; i < mailbox_snapshot->folders; i++) {
AST_LIST_TRAVERSE(&((mailbox_snapshot)->snapshots[i]), msg, msg) {
ast_cli(a->fd, VM_STRING_HEADER_FORMAT, msg->folder_name, msg->callerid, msg->origdate, msg->duration,
msg->flag, msg->msg_id);
}
AST_LIST_UNLOCK(&users);
} else if (pos == 4 || pos == 8 || (pos == 6 && maxpos == 6) ) {
+ int i;
/* Walk through the standard folders */
wordlen = strlen(word);
- for (int i = 0; i < ARRAY_LEN(mailbox_folders); i++) {
+ for (i = 0; i < ARRAY_LEN(mailbox_folders); i++) {
if (folder && !strncasecmp(word, mailbox_folders[i], wordlen) && ++which > state) {
return ast_strdup(mailbox_folders[i]);
}
/* find messages in the folder */
struct ast_vm_mailbox_snapshot *mailbox_snapshot;
struct ast_vm_msg_snapshot *msg;
- int i = 0;
mailbox = a->argv[2];
context = a->argv[3];
folder = a->argv[4];
/* Take a snapshot of the mailbox and snag the individual info */
if ((mailbox_snapshot = ast_vm_mailbox_snapshot_create(mailbox, context, folder, 0, AST_VM_SNAPSHOT_SORT_BY_ID, 0))) {
+ int i;
/* we are only requesting the one folder, but we still need to know it's index */
for (i = 0; i < ARRAY_LEN(mailbox_folders); i++) {
if (!strcasecmp(mailbox_folders[i], folder)) {
struct ast_vm_mailbox_snapshot *mailbox_snapshot;
struct ast_vm_msg_snapshot *msg;
int nummessages = 0;
+ int i;
/* Take a snapshot of the mailbox */
mailbox_snapshot = ast_vm_mailbox_snapshot_create(vmu->mailbox, vmu->context, NULL, 0, AST_VM_SNAPSHOT_SORT_BY_ID, 0);
astman_send_listack(s, m, "Voicemail box detail will follow", "start");
/* walk through each folder's contents and append info for each message */
- for (int i = 0; i < mailbox_snapshot->folders; i++) {
+ for (i = 0; i < mailbox_snapshot->folders; i++) {
AST_LIST_TRAVERSE(&((mailbox_snapshot)->snapshots[i]), msg, msg) {
astman_append(s,
"Event: %s\r\n"