[svn-commits] mmichelson: branch jrothenberger/asterisk-urgent r106695 - /team/jrothenberge...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Mar 7 10:34:10 CST 2008


Author: mmichelson
Date: Fri Mar  7 10:34:10 2008
New Revision: 106695

URL: http://svn.digium.com/view/asterisk?view=rev&rev=106695
Log:
Remove unused resequence_mailbox function


Modified:
    team/jrothenberger/asterisk-urgent/apps/app_voicemail.c

Modified: team/jrothenberger/asterisk-urgent/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_voicemail.c?view=diff&rev=106695&r1=106694&r2=106695
==============================================================================
--- team/jrothenberger/asterisk-urgent/apps/app_voicemail.c (original)
+++ team/jrothenberger/asterisk-urgent/apps/app_voicemail.c Fri Mar  7 10:34:10 2008
@@ -3537,36 +3537,6 @@
 	return res;
 }
 
-#ifndef IMAP_STORAGE
-static int resequence_mailbox(struct ast_vm_user *vmu, char *dir)
-{
-	/* we know max messages, so stop process when number is hit */
-
-	int x,dest;
-	char sfn[PATH_MAX];
-	char dfn[PATH_MAX];
-
-	if (vm_lock_path(dir))
-		return ERROR_LOCK_PATH;
-
-	for (x = 0, dest = 0; x < vmu->maxmsg; x++) {
-		make_file(sfn, sizeof(sfn), dir, x);
-		if (EXISTS(dir, x, sfn, NULL)) {
-			
-			if (x != dest) {
-				make_file(dfn, sizeof(dfn), dir, dest);
-				RENAME(dir, x, vmu->mailbox, vmu->context, dir, dest, sfn, dfn);
-			}
-			
-			dest++;
-		}
-	}
-	ast_unlock_path(dir);
-
-	return 0;
-}
-#endif
-
 static int say_and_wait(struct ast_channel *chan, int num, const char *language)
 {
 	int d;
@@ -5372,7 +5342,6 @@
 #else
 static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu, int box)
 {
-	int res = 0;
 	int count_msg, last_msg;
 
 	ast_copy_string(vms->curbox, mbox(box), sizeof(vms->curbox));
@@ -5408,13 +5377,6 @@
 
 	if (last_msg < 0) 
 		return last_msg;
-	else if (vms->lastmsg != last_msg) {
-		ast_log(LOG_NOTICE, "Resequencing Mailbox: %s\n", vms->curdir);
-		res = resequence_mailbox(vmu, vms->curdir);
-		if (res)
-			return res;
-	}
-
 	return 0;
 }
 #endif




More information about the svn-commits mailing list