[mod_verto] fixed indentation
This commit is contained in:
parent
4815f45767
commit
b2d9d259be
|
@ -2167,7 +2167,7 @@ static void *SWITCH_THREAD_FUNC client_thread(switch_thread_t *thread, void *obj
|
||||||
|
|
||||||
add_jsock(jsock);
|
add_jsock(jsock);
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Starting client thread.\n", jsock->name);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Starting client thread.\n", jsock->name);
|
||||||
|
|
||||||
if ((jsock->ptype & PTYPE_CLIENT) || (jsock->ptype & PTYPE_CLIENT_SSL)) {
|
if ((jsock->ptype & PTYPE_CLIENT) || (jsock->ptype & PTYPE_CLIENT_SSL)) {
|
||||||
client_run(jsock);
|
client_run(jsock);
|
||||||
|
@ -2194,7 +2194,7 @@ static void *SWITCH_THREAD_FUNC client_thread(switch_thread_t *thread, void *obj
|
||||||
|
|
||||||
jsock_flush(jsock);
|
jsock_flush(jsock);
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Ending client thread.\n", jsock->name);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Ending client thread.\n", jsock->name);
|
||||||
if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_CLIENT_DISCONNECT) == SWITCH_STATUS_SUCCESS) {
|
if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_CLIENT_DISCONNECT) == SWITCH_STATUS_SUCCESS) {
|
||||||
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "verto_profile_name", jsock->profile->name);
|
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "verto_profile_name", jsock->profile->name);
|
||||||
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "verto_client_address", jsock->name);
|
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "verto_client_address", jsock->name);
|
||||||
|
@ -2355,15 +2355,15 @@ static switch_status_t verto_set_media_options(verto_pvt_t *tech_pvt, verto_prof
|
||||||
|
|
||||||
static switch_status_t verto_connect(switch_core_session_t *session, const char *method)
|
static switch_status_t verto_connect(switch_core_session_t *session, const char *method)
|
||||||
{
|
{
|
||||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||||
jsock_t *jsock = NULL;
|
jsock_t *jsock = NULL;
|
||||||
verto_pvt_t *tech_pvt = switch_core_session_get_private_class(session, SWITCH_PVT_SECONDARY);
|
verto_pvt_t *tech_pvt = switch_core_session_get_private_class(session, SWITCH_PVT_SECONDARY);
|
||||||
|
|
||||||
if (!(jsock = get_jsock(tech_pvt->jsock_uuid))) {
|
if (!(jsock = get_jsock(tech_pvt->jsock_uuid))) {
|
||||||
status = SWITCH_STATUS_BREAK;
|
status = SWITCH_STATUS_BREAK;
|
||||||
} else {
|
} else {
|
||||||
cJSON *params = NULL;
|
cJSON *params = NULL;
|
||||||
cJSON *msg = NULL;
|
cJSON *msg = NULL;
|
||||||
const char *var = NULL;
|
const char *var = NULL;
|
||||||
switch_caller_profile_t *caller_profile = switch_channel_get_caller_profile(tech_pvt->channel);
|
switch_caller_profile_t *caller_profile = switch_channel_get_caller_profile(tech_pvt->channel);
|
||||||
switch_event_header_t *hi;
|
switch_event_header_t *hi;
|
||||||
|
@ -2419,28 +2419,28 @@ static switch_status_t verto_connect(switch_core_session_t *session, const char
|
||||||
switch_core_media_gen_local_sdp(session, SDP_TYPE_REQUEST, NULL, 0, NULL, 0);
|
switch_core_media_gen_local_sdp(session, SDP_TYPE_REQUEST, NULL, 0, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
msg = jrpc_new_req(method, tech_pvt->call_id, ¶ms);
|
msg = jrpc_new_req(method, tech_pvt->call_id, ¶ms);
|
||||||
|
|
||||||
add_variables(tech_pvt, params);
|
add_variables(tech_pvt, params);
|
||||||
|
|
||||||
if (tech_pvt->mparams->local_sdp_str) {
|
if (tech_pvt->mparams->local_sdp_str) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Local %s SDP %s:\n%s\n",
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Local %s SDP %s:\n%s\n",
|
||||||
method,
|
method,
|
||||||
switch_channel_get_name(tech_pvt->channel),
|
switch_channel_get_name(tech_pvt->channel),
|
||||||
tech_pvt->mparams->local_sdp_str);
|
tech_pvt->mparams->local_sdp_str);
|
||||||
|
|
||||||
cJSON_AddItemToObject(params, "sdp", cJSON_CreateString(tech_pvt->mparams->local_sdp_str));
|
cJSON_AddItemToObject(params, "sdp", cJSON_CreateString(tech_pvt->mparams->local_sdp_str));
|
||||||
set_call_params(params, tech_pvt);
|
set_call_params(params, tech_pvt);
|
||||||
|
|
||||||
jsock_queue_event(jsock, &msg, SWITCH_TRUE);
|
jsock_queue_event(jsock, &msg, SWITCH_TRUE);
|
||||||
} else {
|
} else {
|
||||||
status = SWITCH_STATUS_FALSE;
|
status = SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_thread_rwlock_unlock(jsock->rwlock);
|
switch_thread_rwlock_unlock(jsock->rwlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_status_t verto_tech_media(verto_pvt_t *tech_pvt, const char *r_sdp, switch_sdp_type_t sdp_type)
|
switch_status_t verto_tech_media(verto_pvt_t *tech_pvt, const char *r_sdp, switch_sdp_type_t sdp_type)
|
||||||
|
@ -2476,8 +2476,8 @@ switch_status_t verto_tech_media(verto_pvt_t *tech_pvt, const char *r_sdp, switc
|
||||||
|
|
||||||
static switch_status_t verto_on_init(switch_core_session_t *session)
|
static switch_status_t verto_on_init(switch_core_session_t *session)
|
||||||
{
|
{
|
||||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||||
verto_pvt_t *tech_pvt = switch_core_session_get_private_class(session, SWITCH_PVT_SECONDARY);
|
verto_pvt_t *tech_pvt = switch_core_session_get_private_class(session, SWITCH_PVT_SECONDARY);
|
||||||
|
|
||||||
if (switch_channel_test_flag(tech_pvt->channel, CF_RECOVERING_BRIDGE) || switch_channel_test_flag(tech_pvt->channel, CF_RECOVERING)) {
|
if (switch_channel_test_flag(tech_pvt->channel, CF_RECOVERING_BRIDGE) || switch_channel_test_flag(tech_pvt->channel, CF_RECOVERING)) {
|
||||||
int tries = 120;
|
int tries = 120;
|
||||||
|
@ -2506,7 +2506,7 @@ static switch_status_t verto_on_init(switch_core_session_t *session)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_channel_set_flag(tech_pvt->channel, CF_VIDEO_BREAK);
|
switch_channel_set_flag(tech_pvt->channel, CF_VIDEO_BREAK);
|
||||||
switch_core_session_kill_channel(tech_pvt->session, SWITCH_SIG_BREAK);
|
switch_core_session_kill_channel(tech_pvt->session, SWITCH_SIG_BREAK);
|
||||||
|
|
||||||
tries = 500;
|
tries = 500;
|
||||||
while(--tries > 0 && switch_test_flag(tech_pvt, TFLAG_ATTACH_REQ)) {
|
while(--tries > 0 && switch_test_flag(tech_pvt, TFLAG_ATTACH_REQ)) {
|
||||||
|
@ -2515,7 +2515,7 @@ static switch_status_t verto_on_init(switch_core_session_t *session)
|
||||||
|
|
||||||
switch_core_session_request_video_refresh(session);
|
switch_core_session_request_video_refresh(session);
|
||||||
switch_channel_set_flag(tech_pvt->channel, CF_VIDEO_BREAK);
|
switch_channel_set_flag(tech_pvt->channel, CF_VIDEO_BREAK);
|
||||||
switch_core_session_kill_channel(tech_pvt->session, SWITCH_SIG_BREAK);
|
switch_core_session_kill_channel(tech_pvt->session, SWITCH_SIG_BREAK);
|
||||||
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
@ -2550,8 +2550,8 @@ static switch_state_handler_table_t verto_state_handlers = {
|
||||||
/*.on_reset */ NULL,
|
/*.on_reset */ NULL,
|
||||||
/*.on_park */ NULL,
|
/*.on_park */ NULL,
|
||||||
/*.on_reporting */ NULL,
|
/*.on_reporting */ NULL,
|
||||||
/*.on_destroy */ verto_on_destroy,
|
/*.on_destroy */ verto_on_destroy,
|
||||||
SSH_FLAG_STICKY
|
SSH_FLAG_STICKY
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -4671,9 +4671,9 @@ static int start_jsock(verto_profile_t *profile, ks_socket_t sock, int family)
|
||||||
int flag = 1;
|
int flag = 1;
|
||||||
int i;
|
int i;
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
#else
|
#else
|
||||||
int len;
|
int len;
|
||||||
#endif
|
#endif
|
||||||
jsock_type_t ptype = PTYPE_CLIENT;
|
jsock_type_t ptype = PTYPE_CLIENT;
|
||||||
switch_thread_data_t *td;
|
switch_thread_data_t *td;
|
||||||
|
@ -4830,7 +4830,7 @@ static ks_socket_t prepare_socket(ips_t *ips)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (listen(sock, MAXPENDING) < 0) {
|
if (listen(sock, MAXPENDING) < 0) {
|
||||||
die_errno("Listen error");
|
die_errno("Listen error");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue