[svn-commits] mjordan: trunk r431073 - in /trunk: ./ main/config.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jan 25 07:43:09 CST 2015


Author: mjordan
Date: Sun Jan 25 07:43:07 2015
New Revision: 431073

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431073
Log:
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

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

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

Modified: trunk/main/config.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/config.c?view=diff&rev=431073&r1=431072&r2=431073
==============================================================================
--- trunk/main/config.c (original)
+++ trunk/main/config.c Sun Jan 25 07:43:07 2015
@@ -3351,7 +3351,7 @@
 	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) {




More information about the svn-commits mailing list