introduce new osmo_ss7_asp_disconnect() function
Higher-layer code shouldn't have to worry between client and server difference. It just wants to close the underlying connection for a given ASP - which it now can by means of osmo_ss7_asp_disconnect(). Change-Id: I36b089abd281b8edac8830fda2d8e57cc06cd0a7
This commit is contained in:
parent
03eda14b26
commit
3a57553145
|
@ -309,6 +309,7 @@ int osmo_ss7_as_del_asp(struct osmo_ss7_as *as, const char *asp_name);
|
|||
void osmo_ss7_as_destroy(struct osmo_ss7_as *as);
|
||||
bool osmo_ss7_as_has_asp(struct osmo_ss7_as *as,
|
||||
struct osmo_ss7_asp *asp);
|
||||
void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp);
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -1543,6 +1543,15 @@ int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void osmo_ss7_asp_disconnect(struct osmo_ss7_asp *asp)
|
||||
{
|
||||
if (asp->server)
|
||||
osmo_stream_srv_destroy(asp->server);
|
||||
/* the close_cb() will handle the remaining cleanup here */
|
||||
else if (asp->client)
|
||||
xua_cli_close_and_reconnect(asp->client);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SS7 xUA Server
|
||||
***********************************************************************/
|
||||
|
|
Loading…
Reference in New Issue