[asterisk-commits] trunk r10353 - /trunk/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 16 16:13:49 MST 2006


Author: tilghman
Date: Thu Feb 16 17:13:48 2006
New Revision: 10353

URL: http://svn.digium.com/view/asterisk?rev=10353&view=rev
Log:
Bug 6503 - Change wording from mailbox to folder when referring to the subfolders of a mailbox (less confusing)

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=10353&r1=10352&r2=10353&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Thu Feb 16 17:13:48 2006
@@ -769,9 +769,9 @@
 		ast_copy_string(vmu->password, newpassword, sizeof(vmu->password));
 }
 
-static int make_dir(char *dest, int len, char *context, char *ext, char *mailbox)
-{
-	return snprintf(dest, len, "%s%s/%s/%s", VM_SPOOL_DIR, context, ext, mailbox);
+static int make_dir(char *dest, int len, char *context, char *ext, char *folder)
+{
+	return snprintf(dest, len, "%s%s/%s/%s", VM_SPOOL_DIR, context, ext, folder);
 }
 
 static int make_file(char *dest, int len, char *dir, int num)
@@ -779,33 +779,33 @@
 	return snprintf(dest, len, "%s/msg%04d", dir, num);
 }
 
-/*! \brief basically mkdir -p $dest/$context/$ext/$mailbox
+/*! \brief basically mkdir -p $dest/$context/$ext/$folder
  * \param dest    String. base directory.
  * \param context String. Ignored if is null or empty string.
  * \param ext     String. Ignored if is null or empty string.
- * \param mailbox String. Ignored if is null or empty string. 
+ * \param folder  String. Ignored if is null or empty string. 
  * \return 0 on failure, 1 on success.
  */
-static int create_dirpath(char *dest, int len, char *context, char *ext, char *mailbox)
+static int create_dirpath(char *dest, int len, char *context, char *ext, char *folder)
 {
 	mode_t	mode = VOICEMAIL_DIR_MODE;
 
-	if(context && context[0] != '\0') {
+	if (!ast_strlen_zero(context)) {
 		make_dir(dest, len, context, "", "");
 		if(mkdir(dest, mode) && errno != EEXIST) {
 			ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dest, strerror(errno));
 			return 0;
 		}
 	}
-	if(ext && ext[0] != '\0') {
+	if (!ast_strlen_zero(ext)) {
 		make_dir(dest, len, context, ext, "");
 		if(mkdir(dest, mode) && errno != EEXIST) {
 			ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dest, strerror(errno));
 			return 0;
 		}
 	}
-	if(mailbox && mailbox[0] != '\0') {
-		make_dir(dest, len, context, ext, mailbox);
+	if (!ast_strlen_zero(folder)) {
+		make_dir(dest, len, context, ext, folder);
 		if(mkdir(dest, mode) && errno != EEXIST) {
 			ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", dest, strerror(errno));
 			return 0;
@@ -2538,7 +2538,7 @@
 
 		/* 
 		 * This operation can be very expensive if done say over NFS or if the mailbox has 100+ messages
-		 * in the mailbox.  So we should get this first so we don't cut off the first few seconds of the 
+		 * in the folder.  So we should get this first so we don't cut off the first few seconds of the 
 		 * message.  
 		 */
 		do {



More information about the asterisk-commits mailing list