diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-17 19:41:11 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-30 21:20:45 +0100 |
commit | b6acfdaa24851e1aa95bfc4611709737aaafa5f1 (patch) | |
tree | 77ccb6c9ba4d387381fd82e3768189a6e7a334a7 /src/sysmo_sock.cpp | |
parent | 67ed34eedb59320095396ff2f65f360c046d88c5 (diff) |
bts: Introduce a singleton for the BTS and use it in the code
Compared to the previous code there will be a branch to get the
global pointer so the code will be slightly slower than the previous
version but it allows us to start creating objects but still use
the code from C. It is best approach I have found so far.
One downside of C++ is that by default talloc will not be used
(unless we override the new operator to use talloc. Right now
we need to memset the C data structure by hand. The benefit of
enforcing a better structure should is more important though.
Diffstat (limited to 'src/sysmo_sock.cpp')
-rw-r--r-- | src/sysmo_sock.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sysmo_sock.cpp b/src/sysmo_sock.cpp index 591c105f..2852c0e1 100644 --- a/src/sysmo_sock.cpp +++ b/src/sysmo_sock.cpp @@ -81,7 +81,7 @@ int pcu_sock_send(struct msgb *msg) static void pcu_sock_close(struct pcu_sock_state *state, int lost) { struct osmo_fd *bfd = &state->conn_bfd; - struct gprs_rlcmac_bts *bts = gprs_rlcmac_bts; + struct gprs_rlcmac_bts *bts = bts_main_data(); uint8_t trx, ts; LOGP(DL1IF, LOGL_NOTICE, "PCU socket has %s connection\n", |