[svn-commits] rmudgett: trunk r361523 - in /trunk: ./ main/message.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Apr 6 14:58:48 CDT 2012


Author: rmudgett
Date: Fri Apr  6 14:58:44 2012
New Revision: 361523

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=361523
Log:
Don't add an empty MESSAGE_DATA(key) header if it doesn't already exist.

Doing Set(MESSAGE_DATA(key)=) would add an empty key header if the key
header did not already exist.  If it already existed it would delete it.

* Made msg_set_var_full() exit early if the named variable did not already
exist and the value to set is empty.
........

Merged revisions 361522 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    trunk/   (props changed)
    trunk/main/message.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/main/message.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/message.c?view=diff&rev=361523&r1=361522&r2=361523
==============================================================================
--- trunk/main/message.c (original)
+++ trunk/main/message.c Fri Apr  6 14:58:44 2012
@@ -494,6 +494,9 @@
 	struct msg_data *data;
 
 	if (!(data = msg_data_find(msg->vars, name))) {
+		if (ast_strlen_zero(value)) {
+			return 0;
+		}
 		if (!(data = msg_data_alloc())) {
 			return -1;
 		};




More information about the svn-commits mailing list