White space cleanup and variable naming standardization

This commit is contained in:
William King 2013-02-25 20:18:39 -08:00
parent 8171f6d11a
commit e84cd70147
1 changed files with 7 additions and 8 deletions

View File

@ -176,6 +176,7 @@ switch_status_t rtmp_on_init(switch_core_session_t *session)
switch_mutex_lock(rsession->count_mutex);
rsession->active_sessions++;
switch_mutex_unlock(rsession->count_mutex);
return SWITCH_STATUS_SUCCESS;
}
@ -814,10 +815,10 @@ switch_status_t rtmp_session_destroy(rtmp_session_t **rsession)
void *val;
const void *key;
switch_ssize_t keylen;
rtmp_private_t *item;
rtmp_private_t *tech_pvt;
switch_channel_t *channel;
switch_hash_this(hi, &key, &keylen, &val);
item = (rtmp_private_t *)val;
tech_pvt = (rtmp_private_t *)val;
if ( item->session ) {
channel = switch_core_session_get_channel(item->session);
@ -826,13 +827,11 @@ switch_status_t rtmp_session_destroy(rtmp_session_t **rsession)
}
switch_thread_rwlock_unlock((*rsession)->session_rwlock);
while ((*rsession)->active_sessions > 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Still have %d sessions, waiting\n", (*rsession)->active_sessions);
switch_yield(500000);
}
switch_thread_rwlock_wrlock((*rsession)->rwlock);
switch_thread_rwlock_unlock((*rsession)->rwlock);