aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-13 12:57:06 +0200
committerIvan Kluchnikov <kluchnikovi@gmail.com>2013-07-30 12:21:16 +0400
commit4b984b14a31e9606a26529d4452310f7d9fbdf21 (patch)
treefd724786728e6cbcc99af4169a5f92b40dbe325b
parented70cb733cd3c27f77d95d84e70aee74f0b0efc5 (diff)
misc: Move the nsvc_unblocked into the struct osmo_pcu
-rw-r--r--src/gprs_bssgp_pcu.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index 8c68bf6..edb088c 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -27,6 +27,8 @@ struct osmo_pcu {
struct osmo_timer_list bvc_timer;
+ int nsvc_unblocked;
+
int bvc_sig_reset;
int bvc_reset;
int bvc_unblocked;
@@ -492,7 +494,6 @@ static int sgsn_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, struct msg
return rc;
}
-static int nsvc_unblocked = 0;
static int nsvc_signal_cb(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data)
@@ -510,8 +511,8 @@ static int nsvc_signal_cb(unsigned int subsys, unsigned int signal,
switch (signal) {
case S_NS_UNBLOCK:
- if (!nsvc_unblocked) {
- nsvc_unblocked = 1;
+ if (!the_pcu.nsvc_unblocked) {
+ the_pcu.nsvc_unblocked = 1;
LOGP(DPCU, LOGL_NOTICE, "NS-VC %d is unblocked.\n",
the_pcu.nsvc->nsvci);
the_pcu.bvc_sig_reset = 0;
@@ -521,8 +522,8 @@ static int nsvc_signal_cb(unsigned int subsys, unsigned int signal,
}
break;
case S_NS_BLOCK:
- if (nsvc_unblocked) {
- nsvc_unblocked = 0;
+ if (the_pcu.nsvc_unblocked) {
+ the_pcu.nsvc_unblocked = 0;
osmo_timer_del(&the_pcu.bvc_timer);
the_pcu.bvc_sig_reset = 0;
the_pcu.bvc_reset = 0;