FS-7585: spaces to tabs and clean up trilling spaces
This commit is contained in:
parent
2eda7eb3c3
commit
e187479784
|
@ -110,7 +110,7 @@ switch_status_t rtmp_tech_init(rtmp_private_t *tech_pvt, rtmp_session_t *rsessio
|
||||||
|
|
||||||
/* Initialize read & write codecs */
|
/* Initialize read & write codecs */
|
||||||
if (switch_core_codec_init(&tech_pvt->read_codec, /* name */ "SPEEX", /* modname */ NULL,
|
if (switch_core_codec_init(&tech_pvt->read_codec, /* name */ "SPEEX", /* modname */ NULL,
|
||||||
/* fmtp */ NULL, /* rate */ 16000, /* ms */ 20, /* channels */ 1,
|
/* fmtp */ NULL, /* rate */ 16000, /* ms */ 20, /* channels */ 1,
|
||||||
/* flags */ SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
|
/* flags */ SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
|
||||||
/* codec settings */ NULL, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
/* codec settings */ NULL, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't initialize read codec\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't initialize read codec\n");
|
||||||
|
@ -632,7 +632,7 @@ switch_call_cause_t rtmp_outgoing_channel(switch_core_session_t *session, switch
|
||||||
|
|
||||||
pool = switch_core_session_get_pool(*newsession);
|
pool = switch_core_session_get_pool(*newsession);
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(*newsession);
|
channel = switch_core_session_get_channel(*newsession);
|
||||||
switch_channel_set_name(channel, switch_core_session_sprintf(*newsession, "rtmp/%s/%s", rsession->profile->name, outbound_profile->destination_number));
|
switch_channel_set_name(channel, switch_core_session_sprintf(*newsession, "rtmp/%s/%s", rsession->profile->name, outbound_profile->destination_number));
|
||||||
|
|
||||||
caller_profile = switch_caller_profile_dup(pool, outbound_profile);
|
caller_profile = switch_caller_profile_dup(pool, outbound_profile);
|
||||||
|
@ -943,7 +943,7 @@ switch_call_cause_t rtmp_session_create_call(rtmp_session_t *rsession, switch_co
|
||||||
switch_core_session_get_uuid(*newsession));
|
switch_core_session_get_uuid(*newsession));
|
||||||
|
|
||||||
pool = switch_core_session_get_pool(*newsession);
|
pool = switch_core_session_get_pool(*newsession);
|
||||||
channel = switch_core_session_get_channel(*newsession);
|
channel = switch_core_session_get_channel(*newsession);
|
||||||
switch_channel_set_name(channel, switch_core_session_sprintf(*newsession, "rtmp/%s/%s", rsession->profile->name, number));
|
switch_channel_set_name(channel, switch_core_session_sprintf(*newsession, "rtmp/%s/%s", rsession->profile->name, number));
|
||||||
|
|
||||||
if (!zstr(auth_user) && !zstr(auth_domain)) {
|
if (!zstr(auth_user) && !zstr(auth_domain)) {
|
||||||
|
@ -1663,8 +1663,8 @@ SWITCH_STANDARD_API(rtmp_function)
|
||||||
}
|
}
|
||||||
switch_thread_rwlock_unlock(profile->reg_rwlock);
|
switch_thread_rwlock_unlock(profile->reg_rwlock);
|
||||||
} else {
|
} else {
|
||||||
stream->write_function(stream, "Dialplan: %s\n", profile->dialplan);
|
stream->write_function(stream, "Dialplan: %s\n", profile->dialplan);
|
||||||
stream->write_function(stream, "Context: %s\n", profile->context);
|
stream->write_function(stream, "Context: %s\n", profile->context);
|
||||||
}
|
}
|
||||||
|
|
||||||
rtmp_profile_release(profile);
|
rtmp_profile_release(profile);
|
||||||
|
|
|
@ -591,9 +591,9 @@ switch_status_t rtmp_on_routing(switch_core_session_t *session);
|
||||||
switch_status_t rtmp_on_exchange_media(switch_core_session_t *session);
|
switch_status_t rtmp_on_exchange_media(switch_core_session_t *session);
|
||||||
switch_status_t rtmp_on_soft_execute(switch_core_session_t *session);
|
switch_status_t rtmp_on_soft_execute(switch_core_session_t *session);
|
||||||
switch_call_cause_t rtmp_outgoing_channel(switch_core_session_t *session, switch_event_t *var_event,
|
switch_call_cause_t rtmp_outgoing_channel(switch_core_session_t *session, switch_event_t *var_event,
|
||||||
switch_caller_profile_t *outbound_profile,
|
switch_caller_profile_t *outbound_profile,
|
||||||
switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags,
|
switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags,
|
||||||
switch_call_cause_t *cancel_cause);
|
switch_call_cause_t *cancel_cause);
|
||||||
switch_status_t rtmp_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id);
|
switch_status_t rtmp_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id);
|
||||||
switch_status_t rtmp_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id);
|
switch_status_t rtmp_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id);
|
||||||
switch_status_t rtmp_kill_channel(switch_core_session_t *session, int sig);
|
switch_status_t rtmp_kill_channel(switch_core_session_t *session, int sig);
|
||||||
|
|
|
@ -192,7 +192,7 @@ switch_status_t rtmp_check_auth(rtmp_session_t *rsession, const char *user, cons
|
||||||
switch_xml_t xml = NULL, x_param, x_params;
|
switch_xml_t xml = NULL, x_param, x_params;
|
||||||
switch_bool_t allow_empty_password = SWITCH_FALSE;
|
switch_bool_t allow_empty_password = SWITCH_FALSE;
|
||||||
const char *passwd = NULL;
|
const char *passwd = NULL;
|
||||||
switch_bool_t disallow_multiple_registration = SWITCH_FALSE;
|
switch_bool_t disallow_multiple_registration = SWITCH_FALSE;
|
||||||
switch_event_t *locate_params;
|
switch_event_t *locate_params;
|
||||||
|
|
||||||
switch_event_create(&locate_params, SWITCH_EVENT_GENERAL);
|
switch_event_create(&locate_params, SWITCH_EVENT_GENERAL);
|
||||||
|
@ -216,7 +216,7 @@ switch_status_t rtmp_check_auth(rtmp_session_t *rsession, const char *user, cons
|
||||||
if (!strcasecmp(var, "allow-empty-password")) {
|
if (!strcasecmp(var, "allow-empty-password")) {
|
||||||
allow_empty_password = switch_true(val);
|
allow_empty_password = switch_true(val);
|
||||||
}
|
}
|
||||||
if (!strcasecmp(var, "disallow-multiple-registration")) {
|
if (!strcasecmp(var, "disallow-multiple-registration")) {
|
||||||
disallow_multiple_registration = switch_true(val);
|
disallow_multiple_registration = switch_true(val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -240,27 +240,27 @@ switch_status_t rtmp_check_auth(rtmp_session_t *rsession, const char *user, cons
|
||||||
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_WARNING, "Authentication failed for %s@%s\n", user, domain);
|
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_WARNING, "Authentication failed for %s@%s\n", user, domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disallow_multiple_registration) {
|
if (disallow_multiple_registration) {
|
||||||
switch_hash_index_t *hi;
|
switch_hash_index_t *hi;
|
||||||
switch_thread_rwlock_rdlock(rsession->profile->session_rwlock);
|
switch_thread_rwlock_rdlock(rsession->profile->session_rwlock);
|
||||||
for (hi = switch_core_hash_first(rsession->profile->session_hash); hi; hi = switch_core_hash_next(&hi)) {
|
for (hi = switch_core_hash_first(rsession->profile->session_hash); hi; hi = switch_core_hash_next(&hi)) {
|
||||||
void *val;
|
void *val;
|
||||||
const void *key;
|
const void *key;
|
||||||
switch_ssize_t keylen;
|
switch_ssize_t keylen;
|
||||||
rtmp_session_t *item;
|
rtmp_session_t *item;
|
||||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||||
|
|
||||||
item = (rtmp_session_t *)val;
|
item = (rtmp_session_t *)val;
|
||||||
if (rtmp_session_check_user(item, user, domain) == SWITCH_STATUS_SUCCESS) {
|
if (rtmp_session_check_user(item, user, domain) == SWITCH_STATUS_SUCCESS) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_INFO, "Logging out %s@%s on RTMP sesssion [%s]\n", user, domain, item->uuid);
|
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_INFO, "Logging out %s@%s on RTMP sesssion [%s]\n", user, domain, item->uuid);
|
||||||
if (rtmp_session_logout(item, user, domain) != SWITCH_STATUS_SUCCESS) {
|
if (rtmp_session_logout(item, user, domain) != SWITCH_STATUS_SUCCESS) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_ERROR, "Unable to logout %s@%s on RTMP sesssion [%s]\n", user, domain, item->uuid);
|
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_ERROR, "Unable to logout %s@%s on RTMP sesssion [%s]\n", user, domain, item->uuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
switch_thread_rwlock_unlock(rsession->profile->session_rwlock);
|
switch_thread_rwlock_unlock(rsession->profile->session_rwlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (xml) {
|
if (xml) {
|
||||||
|
@ -466,7 +466,7 @@ void rtmp_send_event(rtmp_session_t *rsession, switch_event_t *event)
|
||||||
|
|
||||||
void rtmp_ping(rtmp_session_t *rsession)
|
void rtmp_ping(rtmp_session_t *rsession)
|
||||||
{
|
{
|
||||||
uint32_t now = (uint32_t)((switch_micro_time_now() / 1000) & 0xFFFFFFFF);
|
uint32_t now = (uint32_t)((switch_micro_time_now() / 1000) & 0xFFFFFFFF);
|
||||||
unsigned char buf[] = {
|
unsigned char buf[] = {
|
||||||
INT16(RTMP_CTRL_PING_REQUEST),
|
INT16(RTMP_CTRL_PING_REQUEST),
|
||||||
INT32(now)
|
INT32(now)
|
||||||
|
|
|
@ -148,7 +148,7 @@ RTMP_INVOKE_FUNCTION(rtmp_i_noop)
|
||||||
|
|
||||||
RTMP_INVOKE_FUNCTION(rtmp_i_receiveaudio)
|
RTMP_INVOKE_FUNCTION(rtmp_i_receiveaudio)
|
||||||
{
|
{
|
||||||
switch_bool_t enabled = argv[1] ? amf0_boolean_get_value(argv[1]) : SWITCH_FALSE;
|
switch_bool_t enabled = argv[1] ? amf0_boolean_get_value(argv[1]) : SWITCH_FALSE;
|
||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
switch_set_flag(rsession, SFLAG_AUDIO);
|
switch_set_flag(rsession, SFLAG_AUDIO);
|
||||||
|
@ -156,14 +156,14 @@ RTMP_INVOKE_FUNCTION(rtmp_i_receiveaudio)
|
||||||
switch_clear_flag(rsession, SFLAG_AUDIO);
|
switch_clear_flag(rsession, SFLAG_AUDIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_INFO, "%sending audio\n", enabled ? "S" : "Not s");
|
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_INFO, "%sending audio\n", enabled ? "S" : "Not s");
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
RTMP_INVOKE_FUNCTION(rtmp_i_receivevideo)
|
RTMP_INVOKE_FUNCTION(rtmp_i_receivevideo)
|
||||||
{
|
{
|
||||||
switch_bool_t enabled = argv[1] ? amf0_boolean_get_value(argv[1]) : SWITCH_FALSE;
|
switch_bool_t enabled = argv[1] ? amf0_boolean_get_value(argv[1]) : SWITCH_FALSE;
|
||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
switch_set_flag(rsession, SFLAG_VIDEO);
|
switch_set_flag(rsession, SFLAG_VIDEO);
|
||||||
|
@ -174,9 +174,9 @@ RTMP_INVOKE_FUNCTION(rtmp_i_receivevideo)
|
||||||
switch_clear_flag(rsession, SFLAG_VIDEO);
|
switch_clear_flag(rsession, SFLAG_VIDEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_INFO, "%sending video\n", enabled ? "S" : "Not s");
|
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_INFO, "%sending video\n", enabled ? "S" : "Not s");
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -562,7 +562,7 @@ RTMP_INVOKE_FUNCTION(rtmp_i_join)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(tech_pvt[0] = rtmp_locate_private(rsession, uuid[0])) ||
|
if (!(tech_pvt[0] = rtmp_locate_private(rsession, uuid[0])) ||
|
||||||
!(tech_pvt[1] = rtmp_locate_private(rsession, uuid[1]))) {
|
!(tech_pvt[1] = rtmp_locate_private(rsession, uuid[1]))) {
|
||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -571,7 +571,7 @@ RTMP_INVOKE_FUNCTION(rtmp_i_join)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((other_uuid[0] = switch_channel_get_partner_uuid(tech_pvt[0]->channel)) &&
|
if ((other_uuid[0] = switch_channel_get_partner_uuid(tech_pvt[0]->channel)) &&
|
||||||
(other_uuid[1] = switch_channel_get_partner_uuid(tech_pvt[1]->channel))) {
|
(other_uuid[1] = switch_channel_get_partner_uuid(tech_pvt[1]->channel))) {
|
||||||
|
|
||||||
#ifndef RTMP_DONT_HOLD
|
#ifndef RTMP_DONT_HOLD
|
||||||
if (switch_test_flag(tech_pvt[0], TFLAG_DETACHED)) {
|
if (switch_test_flag(tech_pvt[0], TFLAG_DETACHED)) {
|
||||||
|
@ -726,12 +726,12 @@ RTMP_INVOKE_FUNCTION(rtmp_i_three_way)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(other_uuid[0] = switch_channel_get_partner_uuid(tech_pvt[0]->channel)) ||
|
if (!(other_uuid[0] = switch_channel_get_partner_uuid(tech_pvt[0]->channel)) ||
|
||||||
!(other_uuid[1] = switch_channel_get_partner_uuid(tech_pvt[1]->channel))) {
|
!(other_uuid[1] = switch_channel_get_partner_uuid(tech_pvt[1]->channel))) {
|
||||||
return SWITCH_STATUS_FALSE; /* Both calls aren't bridged */
|
return SWITCH_STATUS_FALSE; /* Both calls aren't bridged */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(other_session[0] = switch_core_session_locate(other_uuid[0])) ||
|
if (!(other_session[0] = switch_core_session_locate(other_uuid[0])) ||
|
||||||
!(other_session[1] = switch_core_session_locate(other_uuid[1]))) {
|
!(other_session[1] = switch_core_session_locate(other_uuid[1]))) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue