Merge pull request #2556 from signalwire/maria

[mod_mariadb] mariadb_send_query: Coverity 1518917 Calling risky function
This commit is contained in:
Andrey Volk 2024-07-31 19:52:13 +03:00 committed by GitHub
commit 50720f6d62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -641,7 +641,7 @@ switch_status_t mariadb_send_query(mariadb_handle_t *handle, const char* sql)
switch_safe_free(err_str);
/* We are waiting for 500 ms and random time is not more than 500 ms.
This is necessary so that the delay on the primary and secondary servers does not coincide and deadlock does not occur again. */
switch_yield(500 + (rand() & 511));
switch_yield(500 + (switch_rand() & 511));
goto again;
}