From a30f47613abb7c22a26d534d66e478265a8c2c09 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 11 Jul 2013 16:13:38 +0200 Subject: misc: Add an option exit/quit when the BSSGP is supposed to be destroyed The PCU does not properly re-set the state when the connection to the BTS is lost (and the SGSN potentially is re-started during that). This results in the BSSGP BVCI > 1 remaining blocked and no data will be accepted by the SGSN. Add the '-e' option and exit the PCU when the BSSGP/NS are getting destroyed. --- src/pcu_main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/pcu_main.cpp') diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp index 041831f6..754043f9 100644 --- a/src/pcu_main.cpp +++ b/src/pcu_main.cpp @@ -60,6 +60,7 @@ static void print_help() "provided by BTS\n" " -r --realtime PRIO Use SCHED_RR with the specified " "priority\n" + " -e --exit Exit the application on disconnect\n" ); } @@ -75,10 +76,11 @@ static void handle_options(int argc, char **argv) { "mnc", 1, 0, 'n' }, { "version", 0, 0, 'V' }, { "realtime", 1, 0, 'r' }, + { "exit", 0, 0, 'e' }, { 0, 0, 0, 0 } }; - c = getopt_long(argc, argv, "hc:m:n:Vr:", + c = getopt_long(argc, argv, "hc:m:n:Vr:e", long_options, &option_idx); if (c == -1) break; @@ -105,6 +107,9 @@ static void handle_options(int argc, char **argv) case 'r': rt_prio = atoi(optarg); break; + case 'e': + gprs_bssgp_exit_on_destroy(); + break; default: fprintf(stderr, "Unknown option '%c'\n", c); exit(0); -- cgit v1.2.3