via: 3116334d277b0f69305434388bd56f32ae1cb2e6 (commit)
from: f28c211c0c69c8f34a8c483cbb5de379a2b96b84 (commit)
= COMMIT LOG ===========================================================
committer: Anthony Minessale
comments:
FS-3086 --comment-only This should fix the 'hupall' based lockups
diff --git a/src/switch_core_session.c b/src/switch_core_session.c
index d2e28de..dfe419e 100644
--- a/src/switch_core_session.c
+++ b/src/switch_core_session.c
@@ -203,16 +203,12 @@ SWITCH_DECLARE(void) switch_core_session_hupall_matching_var(const char *var_nam
for (hi = switch_hash_first(NULL, session_manager.session_table); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val);
if (val) {
- const char *this_val;
session = (switch_core_session_t *) val;
if (switch_core_session_read_lock(session) == SWITCH_STATUS_SUCCESS) {
- if (switch_channel_up(session->channel) &&
- (this_val = switch_channel_get_variable(session->channel, var_name)) && (!strcmp(this_val, var_val))) {
- np = switch_core_alloc(pool, sizeof(*np));
- np->str = switch_core_strdup(pool, session->uuid_str);
- np->next = head;
- head = np;
- }
+ np = switch_core_alloc(pool, sizeof(*np));
+ np->str = switch_core_strdup(pool, session->uuid_str);
+ np->next = head;
+ head = np;
switch_core_session_rwunlock(session);
}
}
@@ -221,7 +217,11 @@ SWITCH_DECLARE(void) switch_core_session_hupall_matching_var(const char *var_nam
for(np = head; np; np = np->next) {
if ((session = switch_core_session_locate(np->str))) {
- switch_channel_hangup(session->channel, cause);
+ const char *this_val;
+ if (switch_channel_up(session->channel) &&
+ (this_val = switch_channel_get_variable(session->channel, var_name)) && (!strcmp(this_val, var_val))) {
+ switch_channel_hangup(session->channel, cause);
+ }
switch_core_session_rwunlock(session);
}
}
Summary of changes: src/switch_core_session.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email
For more info, see http://blog.chomperstomp.com/?p=630
--
FreeSWITCH Source