[asterisk-commits] rmudgett: branch 10 r361522 - /branches/10/main/message.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 6 14:47:33 CDT 2012
Author: rmudgett
Date: Fri Apr 6 14:47:29 2012
New Revision: 361522
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=361522
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.
Modified:
branches/10/main/message.c
Modified: branches/10/main/message.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/message.c?view=diff&rev=361522&r1=361521&r2=361522
==============================================================================
--- branches/10/main/message.c (original)
+++ branches/10/main/message.c Fri Apr 6 14:47:29 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 asterisk-commits
mailing list