pespin submitted this change.
ss7_as_select_asp: Pass xua_msg instead of osmo_mtp_transfer_param
For TCAP-based loadsharing we need to access the xua_msg.
Related: SYS#5423
Change-Id: I9f376cf4078ccf4001400db4d430b36c540a2790
---
M src/ss7_as.c
M src/ss7_as.h
M src/xua_as_fsm.c
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/ss7_as.c b/src/ss7_as.c
index b4eb439..c2dee9d 100644
--- a/src/ss7_as.c
+++ b/src/ss7_as.c
@@ -42,6 +42,7 @@
#include "ss7_internal.h"
#include "xua_as_fsm.h"
#include "xua_asp_fsm.h"
+#include "xua_msg.h"
/***********************************************************************
* SS7 Application Server
@@ -517,8 +518,9 @@
* This function returns NULL too if multiple ASPs would be selected, ie. AS is
* configured in broadcast mode and more than one ASP is configured.
*/
-struct osmo_ss7_asp *ss7_as_select_asp(struct osmo_ss7_as *as, const struct osmo_mtp_transfer_param *mtp)
+struct osmo_ss7_asp *ss7_as_select_asp(struct osmo_ss7_as *as, const struct xua_msg *xua)
{
+ const struct osmo_mtp_transfer_param *mtp = &xua->mtp;
struct osmo_ss7_asp *asp = NULL;
switch (as->cfg.mode) {
diff --git a/src/ss7_as.h b/src/ss7_as.h
index 98151f8..4f5db78 100644
--- a/src/ss7_as.h
+++ b/src/ss7_as.h
@@ -10,6 +10,7 @@
#include <osmocom/sigtran/osmo_ss7.h>
#include "ss7_internal.h"
+#include "xua_msg.h"
/***********************************************************************
* SS7 Application Server
@@ -132,7 +133,7 @@
};
struct osmo_ss7_as *ss7_as_alloc(struct osmo_ss7_instance *inst, const char *name,
enum osmo_ss7_asp_protocol proto);
-struct osmo_ss7_asp *ss7_as_select_asp(struct osmo_ss7_as *as, const struct osmo_mtp_transfer_param *mtp);
+struct osmo_ss7_asp *ss7_as_select_asp(struct osmo_ss7_as *as, const struct xua_msg *xua);
unsigned int osmo_ss7_as_count_asp(const struct osmo_ss7_as *as);
int ss7_as_add_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp);
diff --git a/src/xua_as_fsm.c b/src/xua_as_fsm.c
index c39132b..fd44e70 100644
--- a/src/xua_as_fsm.c
+++ b/src/xua_as_fsm.c
@@ -201,7 +201,7 @@
* strictly required by M3UA RFC, but would fit the overall
* principle. */
case OSMO_SS7_AS_TMOD_ROUNDROBIN:
- asp = ss7_as_select_asp(as, &xua->mtp);
+ asp = ss7_as_select_asp(as, xua);
break;
case OSMO_SS7_AS_TMOD_BCAST:
return xua_as_transmit_msg_broadcast(as, xua);
To view, visit change 41427. To unsubscribe, or for help writing mail filters, visit settings.