mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-08 17:02:23 +00:00
fix broken build due to running with warnings disabled, oops
This commit is contained in:
parent
71cddf1912
commit
8450dfcaf5
@ -1440,7 +1440,7 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
|||||||
switch_socket_timeout_set(listener->sock, 5000000);
|
switch_socket_timeout_set(listener->sock, 5000000);
|
||||||
#endif
|
#endif
|
||||||
if (listener->profile->debug > 0) {
|
if (listener->profile->debug > 0) {
|
||||||
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Connection Open\n", NULL);
|
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Connection Open%s\n", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_set_flag_locked(listener, LFLAG_RUNNING);
|
switch_set_flag_locked(listener, LFLAG_RUNNING);
|
||||||
@ -1454,7 +1454,7 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
|||||||
if (status != SWITCH_STATUS_SUCCESS) {
|
if (status != SWITCH_STATUS_SUCCESS) {
|
||||||
switch(status) {
|
switch(status) {
|
||||||
case SWITCH_STATUS_TIMEOUT:
|
case SWITCH_STATUS_TIMEOUT:
|
||||||
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Communication Time Out\n", NULL);
|
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Communication Time Out%s\n", "");
|
||||||
|
|
||||||
if(listener->expire_time < switch_epoch_time_now(NULL)) {
|
if(listener->expire_time < switch_epoch_time_now(NULL)) {
|
||||||
switch_event_t *event = NULL;
|
switch_event_t *event = NULL;
|
||||||
@ -1464,7 +1464,7 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Communication Error\n", NULL);
|
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Communication Error%s\n", "");
|
||||||
}
|
}
|
||||||
switch_clear_flag_locked(listener, LFLAG_RUNNING);
|
switch_clear_flag_locked(listener, LFLAG_RUNNING);
|
||||||
break;
|
break;
|
||||||
@ -1487,7 +1487,7 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
|||||||
remove_listener(listener);
|
remove_listener(listener);
|
||||||
|
|
||||||
if (listener->profile->debug > 0) {
|
if (listener->profile->debug > 0) {
|
||||||
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Communication Complete\n", NULL);
|
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Communication Complete%s\n", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_thread_rwlock_wrlock(listener->rwlock);
|
switch_thread_rwlock_wrlock(listener->rwlock);
|
||||||
@ -1500,7 +1500,7 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
|||||||
switch_thread_rwlock_unlock(listener->rwlock);
|
switch_thread_rwlock_unlock(listener->rwlock);
|
||||||
|
|
||||||
if (listener->profile->debug > 0) {
|
if (listener->profile->debug > 0) {
|
||||||
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Communication Closed\n", NULL);
|
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Communication Closed%s\n", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(destroy_pool == 0) {
|
if(destroy_pool == 0) {
|
||||||
|
@ -44,6 +44,10 @@
|
|||||||
"[%s:%d @ %s:%d] " _fmt, skinny_undef_str(listener->device_name), listener->device_instance, skinny_undef_str(listener->remote_ip), \
|
"[%s:%d @ %s:%d] " _fmt, skinny_undef_str(listener->device_name), listener->device_instance, skinny_undef_str(listener->remote_ip), \
|
||||||
listener->remote_port, __VA_ARGS__)
|
listener->remote_port, __VA_ARGS__)
|
||||||
|
|
||||||
|
#define skinny_log_l_msg(listener, level, _fmt) switch_log_printf(SWITCH_CHANNEL_LOG, level, \
|
||||||
|
"[%s:%d @ %s:%d] " _fmt, skinny_undef_str(listener->device_name), listener->device_instance, skinny_undef_str(listener->remote_ip), \
|
||||||
|
listener->remote_port)
|
||||||
|
|
||||||
#define skinny_log_l_ffl(listener, file, func, line, level, _fmt, ...) switch_log_printf( \
|
#define skinny_log_l_ffl(listener, file, func, line, level, _fmt, ...) switch_log_printf( \
|
||||||
SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, level, \
|
SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, level, \
|
||||||
"[%s:%d @ %s:%d] " _fmt, skinny_undef_str(listener->device_name), listener->device_instance, skinny_undef_str(listener->remote_ip), \
|
"[%s:%d @ %s:%d] " _fmt, skinny_undef_str(listener->device_name), listener->device_instance, skinny_undef_str(listener->remote_ip), \
|
||||||
@ -53,6 +57,10 @@
|
|||||||
"[%s:%d @ %s:%d] " _fmt, skinny_undef_str(listener->device_name), listener->device_instance, skinny_undef_str(listener->remote_ip), \
|
"[%s:%d @ %s:%d] " _fmt, skinny_undef_str(listener->device_name), listener->device_instance, skinny_undef_str(listener->remote_ip), \
|
||||||
listener->remote_port, __VA_ARGS__)
|
listener->remote_port, __VA_ARGS__)
|
||||||
|
|
||||||
|
#define skinny_log_ls_msg(listener, session, level, _fmt) switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), level, \
|
||||||
|
"[%s:%d @ %s:%d] " _fmt, skinny_undef_str(listener->device_name), listener->device_instance, skinny_undef_str(listener->remote_ip), \
|
||||||
|
listener->remote_port)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* MODULE TYPES */
|
/* MODULE TYPES */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -469,7 +469,7 @@ switch_status_t perform_send_keep_alive_ack(listener_t *listener,
|
|||||||
|
|
||||||
if ( listener->profile->debug >= 10 ) {
|
if ( listener->profile->debug >= 10 ) {
|
||||||
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
|
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
|
||||||
"Sending Keep Alive Ack\n", NULL);
|
"Sending Keep Alive Ack%s\n", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
return skinny_send_reply_quiet(listener, message);
|
return skinny_send_reply_quiet(listener, message);
|
||||||
@ -653,7 +653,7 @@ switch_status_t perform_send_stop_media_transmission(listener_t *listener,
|
|||||||
/* ... */
|
/* ... */
|
||||||
|
|
||||||
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
|
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
|
||||||
"Send Stop Media Transmission with Conf ID (%d), Passthrough Party ID (%d), Conf ID2\n",
|
"Send Stop Media Transmission with Conf ID (%d), Passthrough Party ID (%d), Conf ID2 (%d)\n",
|
||||||
conference_id, pass_thru_party_id, conference_id2);
|
conference_id, pass_thru_party_id, conference_id2);
|
||||||
|
|
||||||
return skinny_send_reply_quiet(listener, message);
|
return skinny_send_reply_quiet(listener, message);
|
||||||
@ -708,7 +708,7 @@ switch_status_t perform_send_call_info(listener_t *listener,
|
|||||||
message->data.call_info.party_pi_restriction_bits = party_pi_restriction_bits;
|
message->data.call_info.party_pi_restriction_bits = party_pi_restriction_bits;
|
||||||
|
|
||||||
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
|
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
|
||||||
"Send Call Info with ...\n", NULL);
|
"Send Call Info with Line Instance (%d)...\n", line_instance);
|
||||||
|
|
||||||
return skinny_send_reply_quiet(listener, message);
|
return skinny_send_reply_quiet(listener, message);
|
||||||
}
|
}
|
||||||
@ -755,7 +755,7 @@ switch_status_t perform_send_define_current_time_date(listener_t *listener,
|
|||||||
switch_time_exp_lt(&tm, ts);
|
switch_time_exp_lt(&tm, ts);
|
||||||
|
|
||||||
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
|
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
|
||||||
"Send Define Current Time Date with Timestamp (%d)\n", ts / 1000000);
|
"Send Define Current Time Date with Timestamp (%d)\n", (uint32_t) ts / 1000000);
|
||||||
|
|
||||||
return send_define_time_date(listener,
|
return send_define_time_date(listener,
|
||||||
tm.tm_year + 1900,
|
tm.tm_year + 1900,
|
||||||
@ -778,7 +778,7 @@ switch_status_t perform_send_capabilities_req(listener_t *listener,
|
|||||||
message->length = 4;
|
message->length = 4;
|
||||||
|
|
||||||
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
|
skinny_log_l_ffl(listener, file, func, line, SWITCH_LOG_DEBUG,
|
||||||
"Send Capabilities Req\n", NULL);
|
"Send Capabilities Req%s\n", "");
|
||||||
|
|
||||||
return skinny_send_reply_quiet(listener, message);
|
return skinny_send_reply_quiet(listener, message);
|
||||||
}
|
}
|
||||||
|
@ -119,12 +119,12 @@ switch_status_t skinny_create_incoming_session(listener_t *listener, uint32_t *l
|
|||||||
|
|
||||||
if (!(nsession = switch_core_session_request(skinny_get_endpoint_interface(),
|
if (!(nsession = switch_core_session_request(skinny_get_endpoint_interface(),
|
||||||
SWITCH_CALL_DIRECTION_INBOUND, SOF_NONE, NULL))) {
|
SWITCH_CALL_DIRECTION_INBOUND, SOF_NONE, NULL))) {
|
||||||
skinny_log_l(listener, SWITCH_LOG_CRIT, "Error Creating Session\n", NULL);
|
skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Error Creating Session\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(tech_pvt = (struct private_object *) switch_core_session_alloc(nsession, sizeof(*tech_pvt)))) {
|
if (!(tech_pvt = (struct private_object *) switch_core_session_alloc(nsession, sizeof(*tech_pvt)))) {
|
||||||
skinny_log_ls(listener, nsession, SWITCH_LOG_CRIT, "Error Creating Session private object\n", NULL);
|
skinny_log_ls_msg(listener, nsession, SWITCH_LOG_CRIT, "Error Creating Session private object\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,11 +139,11 @@ switch_status_t skinny_create_incoming_session(listener_t *listener, uint32_t *l
|
|||||||
switch_channel_set_name(channel, name);
|
switch_channel_set_name(channel, name);
|
||||||
|
|
||||||
if (switch_core_session_thread_launch(nsession) != SWITCH_STATUS_SUCCESS) {
|
if (switch_core_session_thread_launch(nsession) != SWITCH_STATUS_SUCCESS) {
|
||||||
skinny_log_ls(listener, nsession, SWITCH_LOG_CRIT, "Error Creating Session thread\n", NULL);
|
skinny_log_ls_msg(listener, nsession, SWITCH_LOG_CRIT, "Error Creating Session thread\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (switch_core_session_read_lock(nsession) != SWITCH_STATUS_SUCCESS) {
|
if (switch_core_session_read_lock(nsession) != SWITCH_STATUS_SUCCESS) {
|
||||||
skinny_log_ls(listener, nsession, SWITCH_LOG_CRIT, "Error Locking Session\n", NULL);
|
skinny_log_ls_msg(listener, nsession, SWITCH_LOG_CRIT, "Error Locking Session\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
/* First create the caller profile in the patterns Dialplan */
|
/* First create the caller profile in the patterns Dialplan */
|
||||||
@ -154,7 +154,7 @@ switch_status_t skinny_create_incoming_session(listener_t *listener, uint32_t *l
|
|||||||
"skinny" /* modname */,
|
"skinny" /* modname */,
|
||||||
listener->profile->patterns_context,
|
listener->profile->patterns_context,
|
||||||
"")) != 0) {
|
"")) != 0) {
|
||||||
skinny_log_ls(listener, nsession, SWITCH_LOG_CRIT, "Error Creating Session caller profile\n", NULL);
|
skinny_log_ls_msg(listener, nsession, SWITCH_LOG_CRIT, "Error Creating Session caller profile\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -185,8 +185,8 @@ switch_status_t skinny_create_incoming_session(listener_t *listener, uint32_t *l
|
|||||||
if (switch_channel_get_state(channel) == CS_NEW) {
|
if (switch_channel_get_state(channel) == CS_NEW) {
|
||||||
switch_channel_set_state(channel, CS_HIBERNATE);
|
switch_channel_set_state(channel, CS_HIBERNATE);
|
||||||
} else {
|
} else {
|
||||||
skinny_log_ls(listener, nsession, SWITCH_LOG_CRIT,
|
skinny_log_ls_msg(listener, nsession, SWITCH_LOG_CRIT,
|
||||||
"Wow! this channel should be in CS_NEW state, but it is not!\n", NULL);
|
"Wow! this channel should be in CS_NEW state, but it is not!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
goto done;
|
goto done;
|
||||||
@ -642,7 +642,6 @@ int skinny_session_answer_callback(void *pArg, int argc, char **argv, char **col
|
|||||||
{
|
{
|
||||||
struct skinny_session_answer_helper *helper = pArg;
|
struct skinny_session_answer_helper *helper = pArg;
|
||||||
listener_t *listener = NULL;
|
listener_t *listener = NULL;
|
||||||
char *label;
|
|
||||||
|
|
||||||
char *device_name = argv[0];
|
char *device_name = argv[0];
|
||||||
uint32_t device_instance = atoi(argv[1]);
|
uint32_t device_instance = atoi(argv[1]);
|
||||||
@ -933,8 +932,6 @@ switch_status_t skinny_hold_active_calls(listener_t *listener)
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
switch_status_t skinny_handle_keep_alive_message(listener_t *listener, skinny_message_t *request)
|
switch_status_t skinny_handle_keep_alive_message(listener_t *listener, skinny_message_t *request)
|
||||||
{
|
{
|
||||||
skinny_message_t *message;
|
|
||||||
|
|
||||||
keepalive_listener(listener, NULL);
|
keepalive_listener(listener, NULL);
|
||||||
|
|
||||||
send_keep_alive_ack(listener);
|
send_keep_alive_ack(listener);
|
||||||
@ -1434,7 +1431,7 @@ switch_status_t skinny_handle_speed_dial_stat_request(listener_t *listener, skin
|
|||||||
|
|
||||||
memcpy(&message->data.speed_dial_res, button, sizeof(struct speed_dial_stat_res_message));
|
memcpy(&message->data.speed_dial_res, button, sizeof(struct speed_dial_stat_res_message));
|
||||||
|
|
||||||
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Handle Speed Dial Stat Request\n", NULL);
|
skinny_log_l_msg(listener, SWITCH_LOG_DEBUG, "Handle Speed Dial Stat Request\n");
|
||||||
skinny_send_reply_quiet(listener, message);
|
skinny_send_reply_quiet(listener, message);
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
@ -1855,7 +1852,7 @@ switch_status_t skinny_handle_soft_key_event_message(listener_t *listener, skinn
|
|||||||
}
|
}
|
||||||
|
|
||||||
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Soft Key Event (%s) with Line Instance (%d), Call ID (%d)\n",
|
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Soft Key Event (%s) with Line Instance (%d), Call ID (%d)\n",
|
||||||
request->data.soft_key_event.event, line_instance, call_id);
|
skinny_soft_key_event2str(request->data.soft_key_event.event), line_instance, call_id);
|
||||||
|
|
||||||
switch(request->data.soft_key_event.event) {
|
switch(request->data.soft_key_event.event) {
|
||||||
case SOFTKEY_REDIAL:
|
case SOFTKEY_REDIAL:
|
||||||
@ -1979,7 +1976,7 @@ switch_status_t skinny_handle_soft_key_template_request(listener_t *listener, sk
|
|||||||
message->data.soft_key_template.soft_key[i].soft_key_event = soft_key_template_default_events[i];
|
message->data.soft_key_template.soft_key[i].soft_key_event = soft_key_template_default_events[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Handle Soft Key Template Request with Default Template\n", NULL);
|
skinny_log_l_msg(listener, SWITCH_LOG_DEBUG, "Handle Soft Key Template Request with Default Template\n");
|
||||||
|
|
||||||
skinny_send_reply_quiet(listener, message);
|
skinny_send_reply_quiet(listener, message);
|
||||||
|
|
||||||
@ -2012,7 +2009,7 @@ switch_status_t skinny_handle_register_available_lines_message(listener_t *liste
|
|||||||
{
|
{
|
||||||
skinny_check_data_length(request, sizeof(request->data.reg_lines));
|
skinny_check_data_length(request, sizeof(request->data.reg_lines));
|
||||||
|
|
||||||
skinny_log_l(listener, SWITCH_LOG_DEBUG, "Handle Register Available Lines\n", NULL);
|
skinny_log_l_msg(listener, SWITCH_LOG_DEBUG, "Handle Register Available Lines\n");
|
||||||
|
|
||||||
/* Do nothing */
|
/* Do nothing */
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user