[asterisk-bugs] [JIRA] (ASTERISK-26172) res_sorcery_realtime: fix bug when successful sql UPDATE is treated as failed if there is no affected rows.

Kevin Harwell (JIRA) noreply at issues.asterisk.org
Thu Sep 1 11:21:01 CDT 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Harwell closed ASTERISK-26172.
------------------------------------

                  Resolution: Fixed
    Target Release Version/s: 13.11.0

> res_sorcery_realtime: fix bug when successful sql UPDATE is treated as failed if there is no affected rows.
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-26172
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26172
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Sorcery, Resources/res_config_odbc, Resources/res_realtime
>    Affects Versions: 13.9.1
>            Reporter: Alexei Gradinari
>            Assignee: Alexei Gradinari
>      Target Release: 13.11.0
>
>
> If the SQL UPDATE statement changes nothing then SQLRowCount returns 0.
> This value should be treated as success.
> But the function sorcery_realtime_update treats it as failed.
> This bug was found using stress tests on PJSIP.
> If there are 2 consecutive SIP REGISTER requests with the same contact data  during 1 second then res_pjsip_registrar adds contact location on 1st request and tries to update contact location on 2nd.
> The update fails (because of this bug) and res_pjsip_registrar even removes correct contact location.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list