mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-24 19:52:35 +00:00
fix MODENDP-42
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6220 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
8ff118dc2c
commit
1268358a5f
@ -254,7 +254,6 @@ struct sofia_profile {
|
|||||||
switch_thread_rwlock_t *rwlock;
|
switch_thread_rwlock_t *rwlock;
|
||||||
switch_mutex_t *flag_mutex;
|
switch_mutex_t *flag_mutex;
|
||||||
uint32_t inuse;
|
uint32_t inuse;
|
||||||
uint32_t soft_max;
|
|
||||||
time_t started;
|
time_t started;
|
||||||
uint32_t session_timeout;
|
uint32_t session_timeout;
|
||||||
uint32_t max_proceeding;
|
uint32_t max_proceeding;
|
||||||
|
@ -1917,7 +1917,7 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
|||||||
su_addrinfo_t *my_addrinfo = msg_addrinfo(nua_current_request(nua));
|
su_addrinfo_t *my_addrinfo = msg_addrinfo(nua_current_request(nua));
|
||||||
|
|
||||||
|
|
||||||
if ((profile->soft_max && sess_count >= profile->soft_max) || sess_count >= sess_max) {
|
if (sess_count >= sess_max) {
|
||||||
nua_respond(nh, 480, "Maximum Calls In Progress", SIPTAG_RETRY_AFTER_STR("300"), TAG_END());
|
nua_respond(nh, 480, "Maximum Calls In Progress", SIPTAG_RETRY_AFTER_STR("300"), TAG_END());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2193,19 +2193,18 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "LUKE: I'm hit, but not bad.\n");
|
if (sess_count > 110) {
|
||||||
|
|
||||||
switch_mutex_lock(profile->flag_mutex);
|
switch_mutex_lock(profile->flag_mutex);
|
||||||
|
switch_core_session_limit(sess_count - 10);
|
||||||
profile->soft_max = sess_count - 10;
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "LUKE: I'm hit, but not bad.\n");
|
||||||
switch_core_session_limit(profile->soft_max);
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "LUKE'S VOICE: Artoo, see what you can do with it. Hang on back there....\n"
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "LUKE'S VOICE: Artoo, see what you can do with it. Hang on back there....\n"
|
||||||
"Green laserfire moves past the beeping little robot as his head turns. "
|
"Green laserfire moves past the beeping little robot as his head turns. "
|
||||||
"After a few beeps and a twist of his mechanical arm,\n"
|
"After a few beeps and a twist of his mechanical arm,\n"
|
||||||
"Artoo reduces the max sessions to %d thus, saving the switch from certian doom.\n",
|
"Artoo reduces the max sessions to %d thus, saving the switch from certian doom.\n",
|
||||||
profile->soft_max);
|
sess_count < 10);
|
||||||
|
|
||||||
switch_mutex_unlock(profile->flag_mutex);
|
switch_mutex_unlock(profile->flag_mutex);
|
||||||
|
}
|
||||||
|
|
||||||
if (tech_pvt->hash_key) {
|
if (tech_pvt->hash_key) {
|
||||||
switch_core_hash_delete(tech_pvt->profile->chat_hash, tech_pvt->hash_key);
|
switch_core_hash_delete(tech_pvt->profile->chat_hash, tech_pvt->hash_key);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user