[asterisk-commits] oej: branch oej/minivoicemail r56838 - /team/oej/minivoicemail/apps/app_minivm.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Feb 26 12:12:09 MST 2007


Author: oej
Date: Mon Feb 26 13:12:08 2007
New Revision: 56838

URL: http://svn.digium.com/view/asterisk?view=rev&rev=56838
Log:
Ok, now we can read templates too...

Greetings from holiday in southern France :-)

Modified:
    team/oej/minivoicemail/apps/app_minivm.c

Modified: team/oej/minivoicemail/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/team/oej/minivoicemail/apps/app_minivm.c?view=diff&rev=56838&r1=56837&r2=56838
==============================================================================
--- team/oej/minivoicemail/apps/app_minivm.c (original)
+++ team/oej/minivoicemail/apps/app_minivm.c Mon Feb 26 13:12:08 2007
@@ -1896,18 +1896,20 @@
 			writepos++;
 		}
 		ast_copy_string(writepos, readbuf, sizeof(buf) - (writepos - buf));
-		ast_log(LOG_DEBUG, "---> Message body now: %s\n", buf);
 		writepos += strlen(readbuf) - 1;
 		if (option_debug > 3) {
 			ast_log(LOG_DEBUG, "---> Reading message template : Line %d: %s\n", lines, readbuf);
-			ast_log(LOG_DEBUG, "--->         Strlen readbuf %d Writepos %d Left %d\n", strlen(readbuf), writepos - buf, sizeof(buf) - (writepos - buf));
+			ast_log(LOG_DEBUG, "--->         Strlen readbuf %d Writepos %d Left %d\n", strlen(readbuf), (int) (writepos - buf), (int) ((int) sizeof(buf) - (writepos - buf)));
+			ast_log(LOG_DEBUG, "---> Message body now: %s\n", buf);
 		}
 	}
 	fclose(fi);
 	messagebody = calloc(1, strlen(buf + 1));
-	ast_copy_string(messagebody, buf, sizeof(messagebody));
-	if (option_debug > 3)
-		ast_log(LOG_DEBUG, "---> Reading message template : \n%s\n---- END message template--- \n", messagebody);
+	ast_copy_string(messagebody, buf, strlen(buf) + 1);
+	if (option_debug > 3) {
+		ast_log(LOG_DEBUG, "---> Size of allocation %d\n", (int) strlen(buf + 1) );
+		ast_log(LOG_DEBUG, "---> Done reading message template : \n%s\n---- END message template--- \n", messagebody);
+	}
 
 	return messagebody;
 }
@@ -2281,7 +2283,7 @@
 }
 
 static struct ast_cli_entry cli_voicemail[] = {
-	{ { "minivm", "show", "users", NULL },
+	{ { "minivm", listshow", "users", NULL },
 	handle_minivm_show_users, "List defined mini-voicemail boxes",
 	minivm_show_users_help, complete_minivm_show_users, NULL },
 



More information about the asterisk-commits mailing list