pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/32263 ) Change subject: Move pcu_sock_state to gprs section of bts_sm ...................................................................... Move pcu_sock_state to gprs section of bts_sm Change-Id: I7d739287fd11f81ce657bac362e55fa822fb0ef5 --- M include/osmo-bts/bts_sm.h M src/common/pcu_sock.c 2 files changed, 16 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/63/32263/1 diff --git a/include/osmo-bts/bts_sm.h b/include/osmo-bts/bts_sm.h index 3106115..e6610a5 100644 --- a/include/osmo-bts/bts_sm.h +++ b/include/osmo-bts/bts_sm.h @@ -37,8 +37,8 @@ struct llist_head bts_list; unsigned int num_bts; struct osmo_plmn_id plmn; - struct pcu_sock_state *pcu_state; struct { + struct pcu_sock_state *pcu_state; struct gsm_gprs_nse nse; } gprs; }; diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index fe2dc17..e7bedd1 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -585,7 +585,7 @@ int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed) { - struct pcu_sock_state *state = g_bts_sm->pcu_state; + struct pcu_sock_state *state = g_bts_sm->gprs.pcu_state; struct msgb *msg; struct gsm_pcu_if *pcu_prim; struct gsm_pcu_if_pag_req *pag_req; @@ -955,7 +955,7 @@ int pcu_sock_send(struct msgb *msg) { - struct pcu_sock_state *state = g_bts_sm->pcu_state; + struct pcu_sock_state *state = g_bts_sm->gprs.pcu_state; struct osmo_fd *conn_bfd; struct gsm_pcu_if *pcu_prim = (struct gsm_pcu_if *) msg->data; @@ -1209,7 +1209,7 @@ osmo_signal_register_handler(SS_GLOBAL, pcu_if_signal_cb, NULL); - g_bts_sm->pcu_state = state; + g_bts_sm->gprs.pcu_state = state; LOGP(DPCU, LOGL_INFO, "Started listening on PCU socket: %s\n", path); @@ -1218,7 +1218,7 @@ void pcu_sock_exit(void) { - struct pcu_sock_state *state = g_bts_sm->pcu_state; + struct pcu_sock_state *state = g_bts_sm->gprs.pcu_state; struct osmo_fd *bfd, *conn_bfd; if (!state) @@ -1232,11 +1232,11 @@ close(bfd->fd); osmo_fd_unregister(bfd); talloc_free(state); - g_bts_sm->pcu_state = NULL; + g_bts_sm->gprs.pcu_state = NULL; } bool pcu_connected(void) { - struct pcu_sock_state *state = g_bts_sm->pcu_state; + struct pcu_sock_state *state = g_bts_sm->gprs.pcu_state; if (!state) return false; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I7d739287fd11f81ce657bac362e55fa822fb0ef5 Gerrit-Change-Number: 32263 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange