mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-13 18:47:44 +00:00
[ftmod_misdn] Fix a couple of ftdm_log() printf format errors
Also adds a local ftdm_channel_get_type_str() helper. Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
parent
4c07a00ad7
commit
36b26c51ac
@ -211,6 +211,11 @@ struct misdn_chan_private {
|
|||||||
static ftdm_status_t misdn_handle_incoming(ftdm_channel_t *ftdmchan, const char *rbuf, const int size);
|
static ftdm_status_t misdn_handle_incoming(ftdm_channel_t *ftdmchan, const char *rbuf, const int size);
|
||||||
static int misdn_handle_mph_information_ind(ftdm_channel_t *chan, const struct mISDNhead *hh, const void *data, const int data_len);
|
static int misdn_handle_mph_information_ind(ftdm_channel_t *chan, const struct mISDNhead *hh, const void *data, const int data_len);
|
||||||
|
|
||||||
|
static const char *ftdm_channel_get_type_str(const ftdm_channel_t *chan)
|
||||||
|
{
|
||||||
|
return ftdm_chan_type2str(ftdm_channel_get_type(chan));
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************************
|
/***********************************************************************************
|
||||||
* mISDN interface functions
|
* mISDN interface functions
|
||||||
***********************************************************************************/
|
***********************************************************************************/
|
||||||
@ -655,7 +660,7 @@ static int misdn_handle_mph_information_ind(ftdm_channel_t *chan, const struct m
|
|||||||
}
|
}
|
||||||
bch_info = &info->bch[0];
|
bch_info = &info->bch[0];
|
||||||
|
|
||||||
ftdm_log_chan(chan, FTDM_LOG_DEBUG, "mISDN port state:\n\tD-Chan state:\t%hu\n\tD-Chan flags:\t%#x\n\tD-Chan proto:\t%hu\n\tD-Chan active:\t%s\n",
|
ftdm_log_chan(chan, FTDM_LOG_DEBUG, "mISDN port state:\n\tD-Chan state:\t%hu\n\tD-Chan flags:\t%#lx\n\tD-Chan proto:\t%hu\n\tD-Chan active:\t%s\n",
|
||||||
info->dch.state, info->dch.ch.Flags, info->dch.ch.protocol, info->dch.ch.Flags & (1 << 6) ? "yes" : "no");
|
info->dch.state, info->dch.ch.Flags, info->dch.ch.protocol, info->dch.ch.Flags & (1 << 6) ? "yes" : "no");
|
||||||
|
|
||||||
/* TODO: try to translate this to a usable set of alarm flags */
|
/* TODO: try to translate this to a usable set of alarm flags */
|
||||||
@ -792,7 +797,7 @@ static FIO_OPEN_FUNCTION(misdn_open)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "mISDN invalid channel type '%s'\n",
|
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "mISDN invalid channel type '%s'\n",
|
||||||
ftdm_channel_get_type(ftdmchan));
|
ftdm_channel_get_type_str(ftdmchan));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return FTDM_SUCCESS;
|
return FTDM_SUCCESS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user