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

Alexei Gradinari (JIRA) noreply at issues.asterisk.org
Tue Jul 5 08:59:56 CDT 2016


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

Alexei Gradinari updated ASTERISK-26172:
----------------------------------------

    Reviewboard Link: https://gerrit.asterisk.org/3146

> 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
>
> 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