FS-3353 --resolve

This commit is contained in:
Anthony Minessale 2011-06-20 10:32:11 -05:00
parent 3be64cbf62
commit a5452174d9

View File

@ -1177,12 +1177,14 @@ switch_status_t rtmp_session_check_user(rtmp_session_t *rsession, const char *us
switch_status_t status = SWITCH_STATUS_FALSE; switch_status_t status = SWITCH_STATUS_FALSE;
switch_thread_rwlock_rdlock(rsession->account_rwlock); switch_thread_rwlock_rdlock(rsession->account_rwlock);
if (user && domain) {
for (account = rsession->account; account; account = account->next) { for (account = rsession->account; account; account = account->next) {
if (!strcmp(account->user, user) && !strcmp(account->domain, domain)) { if (account->user && account->domain && !strcmp(account->user, user) && !strcmp(account->domain, domain)) {
status = SWITCH_STATUS_SUCCESS; status = SWITCH_STATUS_SUCCESS;
break; break;
} }
} }
}
switch_thread_rwlock_unlock(rsession->account_rwlock); switch_thread_rwlock_unlock(rsession->account_rwlock);
return status; return status;