ftmod_sangoma_ss7: Fix format string errors.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
parent
da4b28c115
commit
ba1c27fec7
|
@ -293,9 +293,9 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||
case (FTDM_CHANNEL_STATE_HANGUP_COMPLETE):
|
||||
handle_glare:
|
||||
/* the core already has plans for this channel...glare */
|
||||
SS7_INFO_CHAN(ftdmchan, "Got IAM on channel that is already inuse (state=%s|inuse=%d)...glare!\n",
|
||||
SS7_INFO_CHAN(ftdmchan, "Got IAM on channel that is already inuse (state=%s|inuse=%c)...glare!\n",
|
||||
ftdm_channel_state2str (ftdmchan->state),
|
||||
ftdm_test_flag(ftdmchan, FTDM_CHANNEL_INUSE));
|
||||
ftdm_test_flag(ftdmchan, FTDM_CHANNEL_INUSE) ? 'Y' : 'N');
|
||||
|
||||
/* save the info so that we can use it later on */
|
||||
sngss7_info->glare.spInstId = spInstId;
|
||||
|
@ -739,7 +739,7 @@ ftdm_status_t handle_rel_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||
* ITU Q.784 Test Number 3.8
|
||||
* Collision of REL messages
|
||||
*/
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Collision of REL messages. Rx REL while waiting for RLC.\n", " ");
|
||||
SS7_DEBUG_CHAN(ftdmchan, "Collision of REL messages. Rx REL while waiting for RLC.%s\n", " ");
|
||||
if (sngss7_test_ckt_flag(sngss7_info, FLAG_LOCAL_REL) &&
|
||||
!sngss7_test_ckt_flag (sngss7_info, FLAG_REMOTE_REL)) {
|
||||
/* locally requested hangup completed, wait for remote RLC */
|
||||
|
@ -1897,7 +1897,7 @@ ftdm_status_t handle_rsc_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
|
|||
/* go to DOWN */
|
||||
ftdm_set_state(ftdmchan, FTDM_CHANNEL_STATE_DOWN);
|
||||
} else {
|
||||
SS7_ERROR("Received RSC-RLC but we're not waiting on a RSC-RLC on CIC #, dropping\n", sngss7_info->circuit->cic);
|
||||
SS7_ERROR("Received RSC-RLC but we're not waiting on a RSC-RLC on CIC #%d, dropping\n", sngss7_info->circuit->cic);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -280,7 +280,7 @@ void handle_sng_mtp2_alarm(Pst *pst, SdMngmt *sta)
|
|||
sprintf(buf, "[%s]", g_ftdm_sngss7_data.cfg.mtp2Link[x].name);
|
||||
}
|
||||
|
||||
ftdm_log(FTDM_LOG_ERROR,"[MTP2]%s %s : %d\n",
|
||||
ftdm_log(FTDM_LOG_ERROR,"[MTP2]%s %s : %s\n",
|
||||
buf,
|
||||
DECODE_LSD_EVENT(sta->t.usta.alarm.event),
|
||||
DECODE_DISC_REASON(sta->t.usta.evntParm[1]));
|
||||
|
|
|
@ -319,7 +319,7 @@ ftdm_status_t copy_genNmb_from_sngss7(ftdm_channel_t *ftdmchan, SiGenNum *genNmb
|
|||
|
||||
if (genNmb->nmbQual.pres == PRSNT_NODEF) {
|
||||
snprintf(val, sizeof(val), "%d", genNmb->nmbQual.val);
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Generic Number \"number qualifier\" \n", val);
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Generic Number \"number qualifier\" \"%s\"\n", val);
|
||||
sngss7_add_var(sngss7_info, "ss7_gn_numqual", val);
|
||||
}
|
||||
|
||||
|
@ -2454,7 +2454,7 @@ ftdm_status_t sngss7_save_iam(ftdm_channel_t *ftdmchan, SiConEvnt *siConEvnt)
|
|||
goto done;
|
||||
}
|
||||
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Compressed IAM size:%d\n", len);
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Compressed IAM size:%lu\n", len);
|
||||
|
||||
/* Worst case: size will triple after url encode */
|
||||
url_encoded_iam = ftdm_malloc(3*sizeof(*siConEvnt));
|
||||
|
@ -2468,10 +2468,10 @@ ftdm_status_t sngss7_save_iam(ftdm_channel_t *ftdmchan, SiConEvnt *siConEvnt)
|
|||
/* URL encode buffer to that its safe to store it in a string */
|
||||
ftdm_url_encode((const char*)compressed_iam, url_encoded_iam, len);
|
||||
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "IAM variable length:%d\n", strlen(url_encoded_iam));
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "IAM variable length:%"FTDM_SIZE_FMT"\n", strlen(url_encoded_iam));
|
||||
|
||||
if (strlen(url_encoded_iam) > g_ftdm_sngss7_data.cfg.transparent_iam_max_size) {
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_CRIT, "IAM variable length exceeds max size (len:%d max:%d) \n", strlen(url_encoded_iam), g_ftdm_sngss7_data.cfg.transparent_iam_max_size);
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_CRIT, "IAM variable length exceeds max size (len:%"FTDM_SIZE_FMT" max:%d) \n", strlen(url_encoded_iam), g_ftdm_sngss7_data.cfg.transparent_iam_max_size);
|
||||
ret_val = FTDM_FAIL;
|
||||
goto done;
|
||||
}
|
||||
|
@ -2505,10 +2505,10 @@ ftdm_status_t sngss7_retrieve_iam(ftdm_channel_t *ftdmchan, SiConEvnt *siConEvnt
|
|||
|
||||
url_encoded_iam = ftdm_strdup(val);
|
||||
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "IAM variable length:%d\n", strlen(val));
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "IAM variable length:%"FTDM_SIZE_FMT"\n", strlen(val));
|
||||
ftdm_url_decode(url_encoded_iam, &url_encoded_iam_len);
|
||||
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Compressed IAM size:%d\n", url_encoded_iam_len);
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Compressed IAM size:%"FTDM_SIZE_FMT"\n", url_encoded_iam_len);
|
||||
|
||||
uncompressed_buffer = ftdm_malloc(sizeof(*siConEvnt));
|
||||
ftdm_assert_return(uncompressed_buffer, FTDM_FAIL, "Failed to allocate buffer for uncompressed buffer\n");
|
||||
|
@ -2520,7 +2520,7 @@ ftdm_status_t sngss7_retrieve_iam(ftdm_channel_t *ftdmchan, SiConEvnt *siConEvnt
|
|||
}
|
||||
|
||||
if (len != sizeof(*siConEvnt)) {
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_CRIT, "Incompatible IAM structure size (expected:%d size:%d)\n", sizeof(*siConEvnt), strlen(uncompressed_buffer));
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_CRIT, "Incompatible IAM structure size (expected:%"FTDM_SIZE_FMT" size:%"FTDM_SIZE_FMT")\n", sizeof(*siConEvnt), strlen(uncompressed_buffer));
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue