We don't want them to be inherited on exec(). We use exec() to run Transceiver and it OpenBTS process crashes, transceiver becomes owner of all LISTEN sockets.
I have to do a weird thing - forking during initialization of static variables. I turns out main() is too late for that, because we bind sockets in static variables and when we run second instance, it fails in bind and not in our lockfile checking code. Some other ramifications come out because of our heavy use of global variables. Don't do that in your next project - use global variables only when strictly necessary.
This patch adds ability to connect to OpenBTS CLI with TCP socket and UNIX socket. This is configurable in the config file. To connect to the CLI use apps/OpenBTScli executable, which reads configuration from the same config file.
Idea is to make OpenBTS as dumb as possible. It should forward all received SMS messages' RPDU to SMSC (smqueue) and vice versa. All actual message decoding and processing is to be done in smqueue.
M_SILENT_RULES improves readability of the messages emitted by make,
compiler warnings are easier to spot.
Available since automake-1.11, ignored on earlier versions.
Traditional verbose output can be forced by
"./configure --disable-silent-rules" or "make V=1"
Written-by: Alexander Huemer <alexander.huemer@xx.vu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This should make it slightly less frequent to segfault on exit.
Actually we should shutdown all our threads correctly, but that's a lot of work.
(cherry picked from commit 7cd65d3e5a717e0c224477cacfe932cfd7a45b8f)
I don't see real value of this message, while it's been printed to the screen like something very important.
(cherry picked from commit 3f3c9b2d2599a672f08624b3081c2c687cbba4d4)
gethostbyname() is not thread-safe. It's recommended to use gethostbyname_r() or gethostbyname2_r() instead.
(cherry picked from commit f27e9581cdb6837f83d0aab467f0e5f83e814e7b)
Originally there was a fixed-size char array, which didn't allow to work with long hex strings.
(cherry picked from commit fdc6fc85f9f431438ef7279975c2f7c230cb4aa5)
1) It should be memmove(), because source and destination regions may overlap.
2) Amount of moved memory was calculated incorrectly and was about 2x times more then really needed. We thus touched memory outside of the allocated array and may crash the program.
(cherry picked from commit fbed302055ebe77ca19b899c8bc307ca05b4a604)