neels has uploaded this change for review.

View Change

trans_cc_filter_run file,line

Change-Id: I243404487c1871e921b08098086ef2fc78a5561d
---
M include/osmocom/msc/transaction_cc.h
M src/libmsc/transaction_cc.c
2 files changed, 19 insertions(+), 8 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/79/35879/1
diff --git a/include/osmocom/msc/transaction_cc.h b/include/osmocom/msc/transaction_cc.h
index c16d9c1..963cb45 100644
--- a/include/osmocom/msc/transaction_cc.h
+++ b/include/osmocom/msc/transaction_cc.h
@@ -33,6 +33,7 @@
void trans_cc_filter_init(struct gsm_trans *trans);
void trans_cc_filter_set_ran(struct gsm_trans *trans, enum osmo_rat_type ran_type);
void trans_cc_filter_set_bss(struct gsm_trans *trans, struct msc_a *msc_a);
-void trans_cc_filter_run(struct gsm_trans *trans);
+#define trans_cc_filter_run(TRANS_CC) _trans_cc_filter_run(__FILE__, __LINE__, TRANS_CC)
+void _trans_cc_filter_run(const char *file, int line, struct gsm_trans *trans);
void trans_cc_filter_set_ms_from_bc(struct gsm_trans *trans, const struct gsm_mncc_bearer_cap *bcap);
void trans_cc_set_remote_from_bc(struct gsm_trans *trans, const struct gsm_mncc_bearer_cap *bcap);
diff --git a/src/libmsc/transaction_cc.c b/src/libmsc/transaction_cc.c
index 1ea6633..2a540bf 100644
--- a/src/libmsc/transaction_cc.c
+++ b/src/libmsc/transaction_cc.c
@@ -46,24 +46,25 @@
* Complete Layer 3. TODO: make it configurable? */
}

-void trans_cc_filter_run(struct gsm_trans *trans)
+void _trans_cc_filter_run(const char *file, int line, struct gsm_trans *trans)
{
switch (trans->bearer_cap.transfer) {
case GSM48_BCAP_ITCAP_SPEECH:
codec_filter_run(&trans->cc.codecs, &trans->cc.local, &trans->cc.remote);
- LOG_TRANS(trans, LOGL_DEBUG, "codecs: %s\n",
- codec_filter_to_str(&trans->cc.codecs, &trans->cc.local, &trans->cc.remote));
+ LOG_TRANS_CAT_SRC(trans, DCC, LOGL_DEBUG, file, line, "codecs: %s\n",
+ codec_filter_to_str(&trans->cc.codecs, &trans->cc.local, &trans->cc.remote));
break;
case GSM48_BCAP_ITCAP_3k1_AUDIO:
case GSM48_BCAP_ITCAP_FAX_G3:
case GSM48_BCAP_ITCAP_UNR_DIG_INF:
csd_filter_run(&trans->cc.csd, &trans->cc.local, &trans->cc.remote);
- LOG_TRANS(trans, LOGL_DEBUG, "codec/BS: %s\n",
- csd_filter_to_str(&trans->cc.csd, &trans->cc.local, &trans->cc.remote));
+ LOG_TRANS_CAT_SRC(trans, DCC, LOGL_DEBUG, file, line, "codec/BS: %s\n",
+ csd_filter_to_str(&trans->cc.csd, &trans->cc.local, &trans->cc.remote));
break;
default:
- LOG_TRANS(trans, LOGL_ERROR, "Handling of information transfer capability %d not implemented\n",
- trans->bearer_cap.transfer);
+ LOG_TRANS_CAT_SRC(trans, DCC, LOGL_ERROR, file, line,
+ "Handling of information transfer capability %d not implemented\n",
+ trans->bearer_cap.transfer);
break;
}
}

To view, visit change 35879. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I243404487c1871e921b08098086ef2fc78a5561d
Gerrit-Change-Number: 35879
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr@sysmocom.de>
Gerrit-MessageType: newchange