White space cleanup and variable naming standardization

This commit is contained in:
William King 2013-02-25 20:18:39 -08:00
parent ad3a5a3572
commit fec463fdfe
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); switch_mutex_lock(rsession->count_mutex);
rsession->active_sessions++; rsession->active_sessions++;
switch_mutex_unlock(rsession->count_mutex); switch_mutex_unlock(rsession->count_mutex);
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
@ -814,10 +815,10 @@ switch_status_t rtmp_session_destroy(rtmp_session_t **rsession)
void *val; void *val;
const void *key; const void *key;
switch_ssize_t keylen; switch_ssize_t keylen;
rtmp_private_t *item; rtmp_private_t *tech_pvt;
switch_channel_t *channel; switch_channel_t *channel;
switch_hash_this(hi, &key, &keylen, &val); switch_hash_this(hi, &key, &keylen, &val);
item = (rtmp_private_t *)val; tech_pvt = (rtmp_private_t *)val;
if ( item->session ) { if ( item->session ) {
channel = switch_core_session_get_channel(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); switch_thread_rwlock_unlock((*rsession)->session_rwlock);
while ((*rsession)->active_sessions > 0) { while ((*rsession)->active_sessions > 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Still have %d sessions, waiting\n", (*rsession)->active_sessions); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Still have %d sessions, waiting\n", (*rsession)->active_sessions);
switch_yield(500000); switch_yield(500000);
} }
switch_thread_rwlock_wrlock((*rsession)->rwlock); switch_thread_rwlock_wrlock((*rsession)->rwlock);
switch_thread_rwlock_unlock((*rsession)->rwlock); switch_thread_rwlock_unlock((*rsession)->rwlock);