[asterisk-bugs] [JIRA] (ASTERISK-26172) [patch] fix bug when successful sql UPDATE is treated as failed if there is no affected rows.
Alexei Gradinari (JIRA)
noreply at issues.asterisk.org
Mon Jul 4 16:40:56 CDT 2016
Alexei Gradinari created ASTERISK-26172:
-------------------------------------------
Summary: [patch] 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
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