fix some contention issues under really high load...That doesn't mean you need to push it this hard and bug me about it =p

This commit is contained in:
Anthony Minessale
2012-11-07 12:10:50 -06:00
parent feb38cece2
commit f60962ae87
7 changed files with 89 additions and 78 deletions
+2 -3
View File
@@ -635,7 +635,7 @@ int sofia_reg_del_callback(void *pArg, int argc, char **argv, char **columnNames
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "contact", argv[3]);
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "expires", argv[6]);
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "user-agent", argv[7]);
switch_event_fire(&s_event);
sofia_event_fire(profile, &s_event);
}
if (switch_event_create(&s_event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
@@ -653,7 +653,7 @@ int sofia_reg_del_callback(void *pArg, int argc, char **argv, char **columnNames
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "status", "Unregistered");
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "event_type", "presence");
switch_event_fire(&s_event);
sofia_event_fire(profile, &s_event);
}
}
@@ -859,7 +859,6 @@ void sofia_reg_check_sync(sofia_profile_t *profile)
sql = switch_mprintf("delete from sip_registrations where expires > 0 and hostname='%q'", mod_sofia_globals.hostname);
sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE);
sql = switch_mprintf("delete from sip_presence where expires > 0 and hostname='%q'", mod_sofia_globals.hostname);
sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE);