This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/22774 )
Change subject: Introduce osmo_ss7_asp_get_log_subsys()
......................................................................
Introduce osmo_ss7_asp_get_log_subsys()
This will allow us to write generic code that uses DLM3UA/DSUA depending
on the ASP protocol.
Change-Id: I7c015b3a2727deff4fc4e6f3bc7bdeeb57e86166
---
M include/osmocom/sigtran/osmo_ss7.h
M src/osmo_ss7.c
2 files changed, 14 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index 2b4090e..a2263a2 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -451,6 +451,7 @@
int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp);
int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level);
bool osmo_ss7_asp_active(const struct osmo_ss7_asp *asp);
+int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp);
/*! Weak function to handle payload for unknown/unsupported PPID or IPA StreamID.
* This function can be overridden by application code to implement whatever handling
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 2753063..e549708 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -2258,6 +2258,19 @@
return 0;
}
+/*! Get the logging subsystem for a given ASP. Used by generic code. */
+int osmo_ss7_asp_get_log_subsys(const struct osmo_ss7_asp *asp)
+{
+ switch (asp->cfg.proto) {
+ case OSMO_SS7_ASP_PROT_M3UA:
+ return DLM3UA;
+ case OSMO_SS7_ASP_PROT_SUA:
+ return DLSUA;
+ default:
+ return DLSS7;
+ }
+}
+
/*! Register a call-back function for unknown SCTP PPID / IPA Stream ID */
void osmo_ss7_register_rx_unknown_cb(osmo_ss7_asp_rx_unknown_cb *cb)
{
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/22774
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I7c015b3a2727deff4fc4e6f3bc7bdeeb57e86166
Gerrit-Change-Number: 22774
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210208/f7db176f/attachment.htm>