add mutex around gateway access on per-profile basis and token based access to global profiles to prevent hanging on to the hash mutex while doing sql stmts which may cause issues/slowdowns

This commit is contained in:
Anthony Minessale
2011-06-16 14:32:08 -05:00
parent dc61e08e5d
commit 9df8169d1f
6 changed files with 221 additions and 209 deletions
+2
View File
@@ -592,6 +592,7 @@ struct sofia_profile {
uint32_t step_timeout;
uint32_t event_timeout;
int watchdog_enabled;
switch_mutex_t *gw_mutex;
};
struct private_object {
@@ -1034,6 +1035,7 @@ switch_status_t sofia_set_loglevel(const char *name, int level);
* \note Valid components are "default" (sofia's default logger), "tport", "iptsec", "nea", "nta", "nth_client", "nth_server", "nua", "soa", "sresolv", "stun"
* \return the component's loglevel, or -1 if the component isn't valid
*/
switch_status_t list_profiles(const char *line, const char *cursor, switch_console_callback_match_t **matches);
int sofia_get_loglevel(const char *name);
sofia_cid_type_t sofia_cid_name2type(const char *name);
void sofia_glue_tech_set_local_sdp(private_object_t *tech_pvt, const char *sdp_str, switch_bool_t dup);