[asterisk-bugs] [JIRA] (ASTERISK-20337) iax2 provisioning cache mismanaged
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Tue Nov 6 09:39:21 CST 2012
[ https://issues.asterisk.org/jira/browse/ASTERISK-20337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Jordan updated ASTERISK-20337:
-----------------------------------
Target Release Version/s: 10.10.0
1.8.18.0
> iax2 provisioning cache mismanaged
> ----------------------------------
>
> Key: ASTERISK-20337
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-20337
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Channels/chan_iax2
> Affects Versions: 10.7.0
> Environment: All. (running on Mac OSX 10.4.11 Power PC)
> Reporter: John Covert
> Target Release: 1.8.18.0, 10.10.0
>
> Attachments: iax2-provision.c.patch
>
>
> On load, iax2-provision.c routine iax_provision_reload deletes the iax/provisioning/cache tree. This is good.
> Later, when routine iax_provision_version attempts to retrieve the cache entry, the call to ast_db_get is not handled correctly. ast_db_get returns 0 on success and -1 on failure. The existing code treats success as failure and vice versa. As a result, the first call fails, and is treated as success. The subsequent version check fails, and the cache entry is created. From now on, each call to ast_db_get succeeds and returns 0 which is treated as a failure and reported.
> With the attached patch, the test on the call to ast_db_get is properly handled. However, since there will always be a failure after reload, the unlock and return must not be done. Instead, we simply report the error the first time (a correct report, since the cache retrieval did not happen) and go on and build the entry.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list