aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_l1_if.cpp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-28 19:11:20 +0200
committerIvan Kluchnikov <kluchnikovi@gmail.com>2013-09-04 21:28:53 +0400
commite8d9a5fa54a3c0ffac69a7e2f95fec20d2d2c29d (patch)
tree38e78d941b5d06ae390fd17c26b2c626baa37931 /src/pcu_l1_if.cpp
parentb67a8a348a21c75cad063ca53195a3c425b5cc01 (diff)
bssgp: Return the gprs_bssgp_pcu instance from create/connect
This can be used to install handlers/testcases to register callbacks and other data.
Diffstat (limited to 'src/pcu_l1_if.cpp')
-rw-r--r--src/pcu_l1_if.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index e53b683e..43bd36e3 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -336,6 +336,7 @@ int flush_pdch(struct gprs_rlcmac_pdch *pdch, uint8_t trx, uint8_t ts)
static int pcu_rx_info_ind(struct gsm_pcu_if_info_ind *info_ind)
{
struct gprs_rlcmac_bts *bts = gprs_rlcmac_bts;
+ struct gprs_bssgp_pcu *pcu;
struct gprs_rlcmac_pdch *pdch;
struct in_addr ia;
int rc = 0;
@@ -418,12 +419,12 @@ bssgp_failed:
ia.s_addr = htonl(info_ind->remote_ip[0]);
LOGP(DL1IF, LOGL_DEBUG, " remote_ip=%s\n", inet_ntoa(ia));
- rc = gprs_bssgp_create_and_connect(bts, info_ind->local_port[0],
+ pcu = gprs_bssgp_create_and_connect(bts, info_ind->local_port[0],
info_ind->remote_ip[0], info_ind->remote_port[0],
info_ind->nsei, info_ind->nsvci[0], info_ind->bvci,
info_ind->mcc, info_ind->mnc, info_ind->lac, info_ind->rac,
info_ind->cell_id);
- if (rc < 0) {
+ if (!pcu) {
LOGP(DL1IF, LOGL_NOTICE, "SGSN not available\n");
goto bssgp_failed;
}