Hi Holger,
On Sat, Jun 29, 2013 at 09:55:12AM +0200, Holger Hans Peter Freyther wrote:
the "problem" comes from the fact that in
case the "BTS" exits, the next
time the BTS restarts it might gets different IP/PORT settings from
the BSC. So what was/is missing is a "gprs_ns_nsip_shutdown" which
will close the old socket and the PCU should look into destroying the
NSVC that got allocated for the old remote.
Ah, ok. I was (erroneously) assuming that the PCU would simply exit at
the time the connection to osmo-bts drops. This way, it re-spawns and
re-initializes nicely when the BTS is sending the next
PCU_IF_MSG_INFO_IND. However, I may be writing too much Erlang code in
recent days, hence my 'let it exit and re-spawn' attitude ;)
I am attaching two diffs as a proposal (not even
compile tested), they
should avoid the race condition.
Your patches look fine to me. The new gprs_ns_close() declaration of
course would have to go in a libosmogb header file.
I can try to test it later today.
Regards,
Harald
--
- Harald Welte <laforge(a)gnumonks.org>
http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)