mirror of https://gerrit.osmocom.org/libosmocore
turn abis_nm_debugp_foh() into a macro
this will avoid printing 'abis_nm.c' as the filename in the log, which is pretty useless during debugging. We want to know where abis_nm_debugp_foh() is being used from, not where it is implemented.
This commit is contained in:
parent
25bcb6cece
commit
868a5c4782
|
@ -30,7 +30,17 @@ extern const struct tlv_definition abis_nm_att_tlvdef;
|
|||
const char *abis_nm_opstate_name(uint8_t os);
|
||||
const char *abis_nm_avail_name(uint8_t avail);
|
||||
const char *abis_nm_test_name(uint8_t test);
|
||||
void abis_nm_debugp_foh(int ss, struct abis_om_fom_hdr *foh);
|
||||
|
||||
/*! \brief write a human-readable OML header to the debug log
|
||||
* \param[in] ss Logging sub-system
|
||||
* \param[in] foh A-bis OML FOM header
|
||||
*/
|
||||
#define abis_nm_debugp_foh(ss, foh) \
|
||||
DEBUGP(ss, "OC=%s(%02x) INST=(%02x,%02x,%02x) ", \
|
||||
get_value_string(abis_nm_obj_class_names, foh->obj_class), \
|
||||
foh->obj_class, foh->obj_inst.bts_nr, foh->obj_inst.trx_nr, \
|
||||
foh->obj_inst.ts_nr)
|
||||
|
||||
|
||||
int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan);
|
||||
enum abis_nm_chan_comb abis_nm_pchan4chcomb(uint8_t chcomb);
|
||||
|
|
|
@ -407,18 +407,6 @@ const struct value_string abis_nm_adm_state_names[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
/*! \brief write a human-readable OML header to the debug log
|
||||
* \param[in] ss Logging sub-system
|
||||
* \param[in] foh A-bis OML FOM header
|
||||
*/
|
||||
void abis_nm_debugp_foh(int ss, struct abis_om_fom_hdr *foh)
|
||||
{
|
||||
DEBUGP(ss, "OC=%s(%02x) INST=(%02x,%02x,%02x) ",
|
||||
get_value_string(abis_nm_obj_class_names, foh->obj_class),
|
||||
foh->obj_class, foh->obj_inst.bts_nr, foh->obj_inst.trx_nr,
|
||||
foh->obj_inst.ts_nr);
|
||||
}
|
||||
|
||||
static const enum abis_nm_chan_comb chcomb4pchan[] = {
|
||||
[GSM_PCHAN_NONE] = 0xff,
|
||||
[GSM_PCHAN_CCCH] = NM_CHANC_mainBCCH,
|
||||
|
@ -452,4 +440,14 @@ enum abis_nm_chan_comb abis_nm_pchan4chcomb(uint8_t chcomb)
|
|||
return GSM_PCHAN_NONE;
|
||||
}
|
||||
|
||||
/* this is just for compatibility reasons, it is now a macro */
|
||||
#undef abis_nm_debugp_foh
|
||||
void abis_nm_debugp_foh(int ss, struct abis_om_fom_hdr *foh)
|
||||
{
|
||||
DEBUGP(ss, "OC=%s(%02x) INST=(%02x,%02x,%02x) ",
|
||||
get_value_string(abis_nm_obj_class_names, foh->obj_class),
|
||||
foh->obj_class, foh->obj_inst.bts_nr, foh->obj_inst.trx_nr,
|
||||
foh->obj_inst.ts_nr);
|
||||
}
|
||||
|
||||
/*! @} */
|
||||
|
|
Loading…
Reference in New Issue