Skip to content

Commit

Permalink
Merge pull request #2556 from signalwire/maria
Browse files Browse the repository at this point in the history
[mod_mariadb] mariadb_send_query: Coverity 1518917 Calling risky function
  • Loading branch information
andywolk authored Jul 31, 2024
2 parents 8e3d398 + 251da2f commit 50720f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mod/databases/mod_mariadb/mod_mariadb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 50720f6

Please sign in to comment.