9
0
Fork 0

ss7: Inform the application layer that a connection is down

This can be used to force one connection down while the other
is down. E.g. to force SCTP down when the IPA connection is
down as well.
This commit is contained in:
Holger Hans Peter Freyther 2015-09-21 15:47:10 +02:00
parent d5be846c92
commit 78f5060c62
3 changed files with 16 additions and 0 deletions

View File

@ -107,4 +107,7 @@ int ss7_application_mgcp_domain_name(struct ss7_application *,
int ss7_application_trunk_name(struct ss7_application *,
const char *trunk_name);
int ss7_application_msc_down(struct ss7_application *app);
int ss7_application_msc_up(struct ss7_application *app);
#endif

View File

@ -69,6 +69,7 @@ void msc_close_connection(struct msc_connection *fw)
osmo_timer_del(&fw->pong_timeout);
osmo_timer_del(&fw->msc_timeout);
osmo_wqueue_clear(&fw->msc_connection);
ss7_application_msc_down(fw->app);
msc_schedule_reconnect(fw);
}
@ -155,6 +156,7 @@ static int ipaccess_a_fd_cb(struct osmo_fd *bfd)
osmo_timer_del(&fw->msc_timeout);
fw->first_contact = 0;
fw->msc_link_down = 0;
ss7_application_msc_up(fw->app);
msc_send_reset(fw);
}
if (msg->l2h[0] == IPAC_MSGT_ID_GET && fw->token) {
@ -615,6 +617,7 @@ static void msc_handle_id_response(struct msc_connection *msc, struct msgb *msg)
LOGP(DMSC, LOGL_NOTICE, "Authenticated the connection.\n");
msc->auth = 1;
ss7_application_msc_up(msc->app);
return;
clean:
msc_close_connection(msc);

View File

@ -432,3 +432,13 @@ int ss7_application_trunk_name(struct ss7_application *app, const char *name)
return app->trunk_name == NULL;
}
int ss7_application_msc_up(struct ss7_application *app)
{
return 0;
}
int ss7_application_msc_down(struct ss7_application *app)
{
return 0;
}