Feature #6051
open
- Status changed from New to Feedback
- Assignee set to laforge
I think this code is a good place to find a better name:
context_map_sccp.c:
static int tx_sccp_rlsd(struct osmo_fsm_inst *fi)
{
struct hnbgw_context_map *map = fi->priv;
if (!map->cnlink || !map->cnlink->hnbgw_sccp_user) {
LOGPFSML(fi, LOGL_ERROR, "Failed to send SCCP RLSD: no CN link\n");
return -1;
}
return osmo_sccp_tx_disconn(map->cnlink->hnbgw_sccp_user->sccp_user, map->scu_conn_id, NULL, 0);
}
IIUC these points exist:
- tx_sccp_rlsd() implies that a RLSD message will be sent on the wire, but the SCCP-SCOC FSM will do a number of different things that get it to disconnect. So instead of 'rlsd' it should say 'disconn'?
- The "tx" implies a message on the wire, while it is a dispatching of a primitive, more like an FSM event. Instead of "tx" it should say "dispatch"?
Interesting also is, osmo_sccp_tx_disconn() is from osmocom/sigtran/sccp_helpers.h. It has "disconn" in its name but also the "tx".
I'd like to get some feedback on what name would be satisfactory here, instead of tx_sccp_rlsd().
Maybe tx_sccp_disconn()? Or rather dispatch_sccp_disconn()? just sccp_disconn()?
On Tue, Jul 04, 2023 at 10:17:11PM +0000, neels wrote:
I'd like to get some feedback on what name would be satisfactory here, instead of tx_sccp_rlsd().
Maybe tx_sccp_disconn()? Or rather dispatch_sccp_disconn()? just sccp_disconn()?
I think either of those would be fine. The best would probably to avoid the tx_ prefix, as it is
not really transmitting. I just re-checked ITU-T X.210 and it speaks of
- issuing a primitive by an user to a service-provider
- submitting a primitive (user -> provider):
5.2.8 There are two basic types of OSI-service primitive: the submit primitive invoked by the OSI-service-user to exchange information with the OSI-service-provider, and the deliver primitive invoked by the OSI-service-provider to exchange information with the OSI-service-user.
So we end up with the choice of
- {dispatch,submit,issue}_sccp_disconn(), or
- sccp_disconn()
I guess I'd go for submit_sccp_disconn, but have no strong preference
- Status changed from Feedback to New
- Assignee changed from laforge to neels
Also available in: Atom
PDF