[svn-commits] tilghman: branch 1.6.2 r249625 - in /branches/1.6.2: ./ apps/app_voicemail.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Mar 1 12:48:02 CST 2010


Author: tilghman
Date: Mon Mar  1 12:47:58 2010
New Revision: 249625

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=249625
Log:
Merged revisions 249623 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r249623 | tilghman | 2010-03-01 12:36:06 -0600 (Mon, 01 Mar 2010) | 2 lines
  
  Constify a bit of app_voicemail, to make ODBC and IMAP compile once again.
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/apps/app_voicemail.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/apps/app_voicemail.c?view=diff&rev=249625&r1=249624&r2=249625
==============================================================================
--- branches/1.6.2/apps/app_voicemail.c (original)
+++ branches/1.6.2/apps/app_voicemail.c Mon Mar  1 12:47:58 2010
@@ -353,7 +353,7 @@
 static void get_mailbox_delimiter(MAILSTREAM *stream);
 static void mm_parsequota (MAILSTREAM *stream, unsigned char *msg, QUOTALIST *pquota);
 static void imap_mailbox_name(char *spec, size_t len, struct vm_state *vms, int box, int target);
-static int imap_store_file(char *dir, char *mailboxuser, char *mailboxcontext, int msgnum, struct ast_channel *chan, struct ast_vm_user *vmu, char *fmt, int duration, struct vm_state *vms, const char *flag);
+static int imap_store_file(const char *dir, const char *mailboxuser, const char *mailboxcontext, int msgnum, struct ast_channel *chan, struct ast_vm_user *vmu, char *fmt, int duration, struct vm_state *vms, const char *flag);
 static void update_messages_by_imapuser(const char *user, unsigned long number);
 static int vm_delete(char *file);
 
@@ -1946,7 +1946,7 @@
 	}
 }
 
-static int imap_store_file(char *dir, char *mailboxuser, char *mailboxcontext, int msgnum, struct ast_channel *chan, struct ast_vm_user *vmu, char *fmt, int duration, struct vm_state *vms, const char *flag)
+static int imap_store_file(const char *dir, const char *mailboxuser, const char *mailboxcontext, int msgnum, struct ast_channel *chan, struct ast_vm_user *vmu, char *fmt, int duration, struct vm_state *vms, const char *flag)
 {
 	char *myserveremail = serveremail;
 	char fn[PATH_MAX];
@@ -2132,7 +2132,6 @@
 	if (newmsgs) {
 		if ((*newmsgs = __messagecount(context, mailboxnc, imapfolder)) < 0) {
 			return -1;
-		}
 		}
 	}
 	if (oldmsgs) {
@@ -3310,15 +3309,17 @@
  * 
  * \return the value greater than zero on success to indicate the number of messages, less than zero on error.
  */
-static void delete_file(char *sdir, int smsg)
+static void delete_file(const char *sdir, int smsg)
 {
 	SQLHSTMT stmt;
 	char sql[PATH_MAX];
 	char msgnums[20];
-	char *argv[] = { sdir, msgnums };
+	char *argv[] = { NULL, msgnums };
 	struct generic_prepare_struct gps = { .sql = sql, .argc = 2, .argv = argv };
-
 	struct odbc_obj *obj;
+
+	argv[0] = ast_strdupa(sdir);
+
 	obj = ast_odbc_request_obj(odbc_database, 0);
 	if (obj) {
 		snprintf(msgnums, sizeof(msgnums), "%d", smsg);
@@ -3374,8 +3375,8 @@
 
 struct insert_data {
 	char *sql;
-	char *dir;
-	char *msgnums;
+	const char *dir;
+	const char *msgnums;
 	void *data;
 	SQLLEN datalen;
 	SQLLEN indlen;
@@ -3384,8 +3385,8 @@
 	const char *callerid;
 	const char *origtime;
 	const char *duration;
-	char *mailboxuser;
-	char *mailboxcontext;
+	const char *mailboxuser;
+	const char *mailboxcontext;
 	const char *category;
 	const char *flag;
 };
@@ -3440,7 +3441,7 @@
  *
  * \return the zero on success -1 on error.
  */
-static int store_file(char *dir, char *mailboxuser, char *mailboxcontext, int msgnum)
+static int store_file(const char *dir, const char *mailboxuser, const char *mailboxcontext, int msgnum)
 {
 	int res = 0;
 	int fd = -1;




More information about the svn-commits mailing list