[asterisk-users] Realtime not storing voicemail password changes

Matthew Jordan mjordan at digium.com
Tue Dec 16 11:08:50 CST 2014


On Tue, Dec 16, 2014 at 6:25 AM, Paddy Grice <paddy at wizaner.com> wrote:
> Hi All
>
> I am trying to get voicemail switched over to ARA on version 13 and notice
> that the password is not stored in the db when it is changed.
>
> A little hair pulling and playing around and I think the problem is in the
> function ast_update2_realtime in main/config.c.
>
> Issued source is ==>
>
> int ast_update2_realtime(const char *family, ...)
> {
>         RAII_VAR(struct ast_variable *, lookup_fields, NULL,
> ast_variables_destroy);
>         RAII_VAR(struct ast_variable *, update_fields, NULL,
> ast_variables_destroy);
>         va_list ap;
>
>         va_start(ap, family);
>         /* XXX: If we wanted to pass no lookup fields (select all), we'd be
>          * out of luck. realtime_arguments_to_fields expects at least one
> key
>          * value pair. */
>         realtime_arguments_to_fields(ap, &lookup_fields);
>         va_end(ap);
>
>         va_start(ap, family);
>         realtime_arguments_to_fields2(ap, 1, &lookup_fields);
>         va_end(ap);
>
>         if (!lookup_fields || !update_fields) {
>                 return -1;
>         }
>
>         return ast_update2_realtime_fields(family, lookup_fields,
> update_fields);
> }
>
> I believe line 3314 of the file main/config.c should be
>
>         realtime_arguments_to_fields2(ap, 1, &update_fields);

That looks right to me. Otherwise, we never extract the variable list
arguments passed in to the ast_variable list update_fields. Yikes.

> I have changed it and it works for me - but -
>
> 1)    I don't know what else this may effect
> 2)    I dont know how to pass this on to the development team
>

Please file a bug on issues.asterisk.org.

-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org



More information about the asterisk-users mailing list