ftmod_gsm: Fix format string errors.
Two fixes: Use ftdm_set_string() instead of sprintf() (seriously, wtf?). Drop invalid, needless argument to ftdm_log(). Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
parent
435f28cefb
commit
03a219772c
|
@ -718,7 +718,7 @@ static ftdm_status_t ftdm_gsm_state_advance(ftdm_channel_t *ftdmchan)
|
||||||
gsm_data->call_id = g_outbound_call_id++;
|
gsm_data->call_id = g_outbound_call_id++;
|
||||||
wat_con_event_t con_event;
|
wat_con_event_t con_event;
|
||||||
memset(&con_event, 0, sizeof(con_event));
|
memset(&con_event, 0, sizeof(con_event));
|
||||||
sprintf(con_event.called_num.digits, ftdmchan->caller_data.dnis.digits);
|
ftdm_set_string(con_event.called_num.digits, ftdmchan->caller_data.dnis.digits);
|
||||||
ftdm_log(FTDM_LOG_DEBUG, "Dialing number %s\n", con_event.called_num.digits);
|
ftdm_log(FTDM_LOG_DEBUG, "Dialing number %s\n", con_event.called_num.digits);
|
||||||
wat_con_req(ftdmchan->span->span_id, gsm_data->call_id , &con_event);
|
wat_con_req(ftdmchan->span->span_id, gsm_data->call_id , &con_event);
|
||||||
|
|
||||||
|
@ -945,7 +945,7 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_gsm_configure_span_signaling)
|
||||||
var = ftdm_parameters[paramindex].var;
|
var = ftdm_parameters[paramindex].var;
|
||||||
val = ftdm_parameters[paramindex].val;
|
val = ftdm_parameters[paramindex].val;
|
||||||
if (!ftdm_strlen_zero_buf(val)) {
|
if (!ftdm_strlen_zero_buf(val)) {
|
||||||
ftdm_log(FTDM_LOG_WARNING, "Ignoring empty GSM parameter %s for span %s\n", var, val, span->name);
|
ftdm_log(FTDM_LOG_WARNING, "Ignoring empty GSM parameter %s for span %s\n", var, span->name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ftdm_log(FTDM_LOG_DEBUG, "Reading GSM parameter %s=%s for span %s\n", var, val, span->name);
|
ftdm_log(FTDM_LOG_DEBUG, "Reading GSM parameter %s=%s for span %s\n", var, val, span->name);
|
||||||
|
|
Loading…
Reference in New Issue