summaryrefslogtreecommitdiff
path: root/main/config.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2015-01-25 13:43:07 +0000
committerMatthew Jordan <mjordan@digium.com>2015-01-25 13:43:07 +0000
commita8ae5a7bcb3c102b1a196d109a1d06507dd3dd1e (patch)
tree5ad6ce32d66e8c45a02f22c2ccc97b856775a994 /main/config.c
parentb69b0d12eeee6ac1913694ab89aaa68d53d29826 (diff)
dynamic realtime: Updates fail to work due to update fields being passed over
When a crash was fixed due to usage of the REALTIME function in r423003, a regression was introduced into ast_update2_realtime where the update fields passed to the function would be skipped and the lookup field processed twice. The use of this function is a bit interesting: A variable argument list is used with two sentinel values - the first marks the end of the lookup fields/values; the second marks the end of the update fields/values. Unfortunately, ast_update2_realtime parses over the lookup fields twice, as opposed to parsing over the update fields. This causes the lookups to succeed, but the updates itself to have no effect. Note that the most common instance of this problem occurred in app_voicemail during the updating of a mailbox password. Thanks to the issue reporter, Paddy Grice, for pointing out the problem. Review: https://reviewboard.asterisk.org/r/4356/ ASTERISK-24231 ASTERISK-24626 #close Reported by: Paddy Grice ........ Merged revisions 431072 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/config.c')
-rw-r--r--main/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/config.c b/main/config.c
index f454544f2..0aa6bbefc 100644
--- a/main/config.c
+++ b/main/config.c
@@ -3351,7 +3351,7 @@ int ast_update2_realtime(const char *family, ...)
va_end(ap);
va_start(ap, family);
- realtime_arguments_to_fields2(ap, 1, &lookup_fields);
+ realtime_arguments_to_fields2(ap, 1, &update_fields);
va_end(ap);
if (!lookup_fields || !update_fields) {