ss7: Move the blocking of outgoing messages into the SS7 app
We are using knowledge of the SS7 application to drop outgoing packages to force failures on the link and should move this into the ss7 application.
This commit is contained in:
parent
d38b87a4c9
commit
899198ed2e
|
@ -23,7 +23,6 @@
|
|||
#include <bsc_data.h>
|
||||
#include <cellmgr_debug.h>
|
||||
#include <isup_types.h>
|
||||
#include <ss7_application.h>
|
||||
#include <counter.h>
|
||||
|
||||
#include <osmocore/talloc.h>
|
||||
|
@ -36,23 +35,6 @@
|
|||
|
||||
static int mtp_int_submit(struct mtp_link_set *set, int pc, int sls, int type, const uint8_t *data, unsigned int length);
|
||||
|
||||
void mtp_link_submit(struct mtp_link *link, struct msgb *msg)
|
||||
{
|
||||
if (link->set->app && link->set->app->type == APP_STP) {
|
||||
if (!link->set->app->route_src.up || !link->set->app->route_dst.up) {
|
||||
LOGP(DINP, LOGL_NOTICE, "Not sending data as application is down %d/%s.\n",
|
||||
link->set->app->nr, link->set->app->name);
|
||||
msgb_free(msg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
rate_ctr_inc(&link->ctrg->ctr[MTP_LNK_OUT]);
|
||||
rate_ctr_inc(&link->set->ctrg->ctr[MTP_LSET_TOTA_OUT_MSG]);
|
||||
link->write(link, msg);
|
||||
}
|
||||
|
||||
|
||||
struct msgb *mtp_msg_alloc(struct mtp_link_set *set)
|
||||
{
|
||||
struct mtp_level_3_hdr *hdr;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <cellmgr_debug.h>
|
||||
#include <msc_connection.h>
|
||||
#include <sctp_m2ua.h>
|
||||
#include <counter.h>
|
||||
|
||||
#include <osmocore/talloc.h>
|
||||
|
||||
|
@ -381,3 +382,19 @@ void ss7_application_pass_isup(struct ss7_application *app, int pass)
|
|||
if (app->route_dst.set)
|
||||
app->route_dst.set->pass_all_isup = pass;
|
||||
}
|
||||
|
||||
void mtp_link_submit(struct mtp_link *link, struct msgb *msg)
|
||||
{
|
||||
if (link->set->app && link->set->app->type == APP_STP) {
|
||||
if (!link->set->app->route_src.up || !link->set->app->route_dst.up) {
|
||||
LOGP(DINP, LOGL_NOTICE, "Not sending data as application is down %d/%s.\n",
|
||||
link->set->app->nr, link->set->app->name);
|
||||
msgb_free(msg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
rate_ctr_inc(&link->ctrg->ctr[MTP_LNK_OUT]);
|
||||
rate_ctr_inc(&link->set->ctrg->ctr[MTP_LSET_TOTA_OUT_MSG]);
|
||||
link->write(link, msg);
|
||||
}
|
||||
|
|
Reference in New Issue