]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Expose link status
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 31 Oct 2016 17:02:17 +0000 (13:02 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 31 Oct 2016 17:02:17 +0000 (13:02 -0400)
src/modules/rlm_sigtran/libosmo-m3ua/include/sctp_m3ua.h
src/modules/rlm_sigtran/libosmo-m3ua/sctp_m3ua_client.c
src/modules/rlm_sigtran/sccp.c
src/modules/rlm_sigtran/sigtran.h

index 81443645a6af2ec594593d10c4fa49364dee5dab..59795c30ca964bf8b891468c60c102d9f1d0d66b 100644 (file)
@@ -87,6 +87,7 @@ struct mtp_m3ua_reg_req {
        struct mtp_m3ua_client_link *link;      //!< Pointer back to the part link.
 };
 
+int mtp_m3ua_link_is_up(struct mtp_m3ua_client_link *link);
 struct mtp_m3ua_reg_req *mtp_m3ua_reg_req_add(struct mtp_m3ua_client_link *link);
 struct mtp_m3ua_client_link *mtp_m3ua_client_link_init(struct mtp_link *link);
 
index 424d02a24219c6a633306bc43cdda29c1463d8ab..9ece145017c5ec9cce8fee6260024100a39d6037 100644 (file)
@@ -480,6 +480,11 @@ struct mtp_m3ua_client_link *mtp_m3ua_client_link_init(struct mtp_link *blnk)
        return lnk;
 }
 
+int mtp_m3ua_link_is_up(struct mtp_m3ua_client_link *link)
+{
+       return link->asptm_active;
+}
+
 struct mtp_m3ua_reg_req *mtp_m3ua_reg_req_add(struct mtp_m3ua_client_link *link)
 {
        struct mtp_m3ua_reg_req *route;
index 937e941dcf6013fc14a70d3dae35fc843d720215..9a0ba06997b16b761106d42fba1e45d688c51680 100644 (file)
@@ -136,7 +136,7 @@ int sigtran_tcap_outgoing(UNUSED struct msgb *msg_in, void *ctx, sigtran_transac
 
        rad_assert(req->imsi);
 
-       if (!m3ua_client->asptm_active) {
+       if (mtp_m3ua_link_is_up(m3ua_client)) {
                REDEBUG("Link not yet active, dropping the request");
 
                return -1;
index 8d77c6916e0a8d78ecd6b58e9467e41d9c2e4df0..95f1e97a880b4031350a8817c6a48f4bc21d6757 100644 (file)
@@ -262,7 +262,7 @@ int sigtran_event_exit(void);
 /*
  *     sccp.c
  */
-void   sigtran_tcap_outgoing(UNUSED struct msgb *msg_in, void *ctx, sigtran_transaction_t *txn, struct osmo_fd *ofd);
+int    sigtran_tcap_outgoing(UNUSED struct msgb *msg_in, void *ctx, sigtran_transaction_t *txn, struct osmo_fd *ofd);
 
 void   sigtran_sccp_incoming(struct mtp_link_set *set, struct msgb *msg, int sls);