pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-smlc/+/40673?usp=email )
Change subject: lb_peer: Mark multiple funcs as stati
......................................................................
lb_peer: Mark multiple funcs as stati
Change-Id: I7178608444f72bfb93b816a0bedee336a5b4cafe
---
M include/osmocom/smlc/lb_peer.h
M src/osmo-smlc/lb_peer.c
2 files changed, 18 insertions(+), 19 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-smlc refs/changes/73/40673/1
diff --git a/include/osmocom/smlc/lb_peer.h b/include/osmocom/smlc/lb_peer.h
index 7eabe4d..dc226fa 100644
--- a/include/osmocom/smlc/lb_peer.h
+++ b/include/osmocom/smlc/lb_peer.h
@@ -64,4 +64,3 @@
int lb_peer_up_l2(struct sccp_lb_inst *sli, const struct osmo_sccp_addr *calling_addr,
bool co, uint32_t conn_id,
struct msgb *l2);
-void lb_peer_disconnect(struct sccp_lb_inst *sli, uint32_t conn_id);
diff --git a/src/osmo-smlc/lb_peer.c b/src/osmo-smlc/lb_peer.c
index f2dc715..84d48fc 100644
--- a/src/osmo-smlc/lb_peer.c
+++ b/src/osmo-smlc/lb_peer.c
@@ -88,7 +88,7 @@
#define lb_peer_state_chg(LB_PEER, NEXT_STATE) \
osmo_tdef_fsm_inst_state_chg((LB_PEER)->fi, NEXT_STATE, lb_peer_fsm_timeouts,
g_smlc_tdefs, 5)
-void lb_peer_discard_all_conns(struct lb_peer *lbp)
+static void lb_peer_discard_all_conns(struct lb_peer *lbp)
{
struct lb_conn *lb_conn, *next;
@@ -137,7 +137,7 @@
lb_peer_state_chg(lbp, LB_PEER_ST_READY);
}
-void lb_peer_reset(struct lb_peer *lbp)
+static void lb_peer_reset(struct lb_peer *lbp)
{
struct bssap_le_pdu reset = {
.discr = BSSAP_LE_MSG_DISCR_BSSMAP_LE,
@@ -167,7 +167,18 @@
}
}
-void lb_peer_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+static void lb_peer_disconnect(struct sccp_lb_inst *sli, uint32_t conn_id)
+{
+ struct lb_conn *lb_conn;
+ llist_for_each_entry(lb_conn, &sli->lb_conns, entry) {
+ if (lb_conn->sccp_conn_id == conn_id) {
+ lb_conn_discard(lb_conn);
+ return;
+ }
+ }
+}
+
+static void lb_peer_allstate_action(struct osmo_fsm_inst *fi, uint32_t event, void
*data)
{
struct lb_peer *lbp = fi->priv;
struct lb_peer_ev_ctx *ctx = data;
@@ -196,7 +207,7 @@
}
}
-void lb_peer_st_wait_rx_reset(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+static void lb_peer_st_wait_rx_reset(struct osmo_fsm_inst *fi, uint32_t event, void
*data)
{
struct lb_peer *lbp = fi->priv;
struct lb_peer_ev_ctx *ctx;
@@ -230,7 +241,7 @@
}
}
-void lb_peer_st_wait_rx_reset_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+static void lb_peer_st_wait_rx_reset_ack(struct osmo_fsm_inst *fi, uint32_t event, void
*data)
{
struct lb_peer *lbp = fi->priv;
struct lb_peer_ev_ctx *ctx;
@@ -265,7 +276,7 @@
}
}
-void lb_peer_st_ready(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+static void lb_peer_st_ready(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct lb_peer *lbp = fi->priv;
struct lb_peer_ev_ctx *ctx;
@@ -336,7 +347,7 @@
return 0;
}
-void lb_peer_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)
+static void lb_peer_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause
cause)
{
struct lb_peer *lbp = fi->priv;
lb_peer_discard_all_conns(lbp);
@@ -482,14 +493,3 @@
return osmo_fsm_inst_dispatch(lb_peer->fi, event, &ctx);
}
-
-void lb_peer_disconnect(struct sccp_lb_inst *sli, uint32_t conn_id)
-{
- struct lb_conn *lb_conn;
- llist_for_each_entry(lb_conn, &sli->lb_conns, entry) {
- if (lb_conn->sccp_conn_id == conn_id) {
- lb_conn_discard(lb_conn);
- return;
- }
- }
-}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-smlc/+/40673?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-smlc
Gerrit-Branch: master
Gerrit-Change-Id: I7178608444f72bfb93b816a0bedee336a5b4cafe
Gerrit-Change-Number: 40673
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>