[asterisk-commits] mmichelson: branch mmichelson/trunk-digiumphones r365010 - /team/mmichelson/t...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 2 10:59:15 CDT 2012


Author: mmichelson
Date: Wed May  2 10:59:11 2012
New Revision: 365010

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=365010
Log:
Add some cleanup to message ID auto-generation.

I have done a manual test and found that this works fine for
text-based configuration.


Modified:
    team/mmichelson/trunk-digiumphones/apps/app_voicemail.c

Modified: team/mmichelson/trunk-digiumphones/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/trunk-digiumphones/apps/app_voicemail.c?view=diff&rev=365010&r1=365009&r2=365010
==============================================================================
--- team/mmichelson/trunk-digiumphones/apps/app_voicemail.c (original)
+++ team/mmichelson/trunk-digiumphones/apps/app_voicemail.c Wed May  2 10:59:11 2012
@@ -11301,6 +11301,7 @@
 		msg_cfg = ast_config_load(filename, config_flags);
 
 		if (!msg_cfg || msg_cfg == CONFIG_STATUS_FILEINVALID) {
+			ast_log(LOG_WARNING, "Unable to open metadata file %s\n", filename);
 			DISPOSE(vms.curdir, vms.curmsg);
 			res = -1;
 			goto done;
@@ -11322,16 +11323,13 @@
 		cat = ast_category_get(msg_cfg, "message");
 		ast_variable_append(cat, var);
 		if (ast_config_text_file_save(filename, msg_cfg, "app_voicemail")) {
-			/* EFF */
-		}
-		/* Hmm, what do we actually do here?
-		 * STORE is probably the best choice since we got both the message and its
-		 * metadata. Will it result in duplicates? Do we need to delete the first
-		 * version and then STORE? I'm starting to think that a better idea is to
-		 * implement the idea of just grabbing metadata and adding a macro to update
-		 * said metadata as well. Hard to believe this is the first instance where such
-		 * an operation is needed though...
-		 */
+			ast_log(LOG_WARNING, "Unable to update %s to have a message ID\n", filename);
+			ast_config_destroy(msg_cfg);
+			DISPOSE(vms.curdir, vms.curmsg);
+			res = -1;
+			goto done;
+		}
+		/* XXX Update ODBC and IMAP stores here */
 	}
 done:
 	return res;




More information about the asterisk-commits mailing list