laforge
/
openbts-osmo
Archived
1
0
Fork 0
Commit Graph

27 Commits

Author SHA1 Message Date
Ivan Kluchnikov 20ea06422d Merge commit 'USSD' 2011-08-22 16:52:29 +04:00
Thomas Tsou 8301298f88 Merge branch 'remote-cli'
* remote-cli: (22 commits)
  Throw exception if usrp is not found. Don't crash transceiver.
  Update OpenBTS init script
  Correctly exit OpenBTS even if console is not started yet.
  Add option to run OpenBTS in a failsafe loop.
  Shutdown without core dump on a usual SocketError.
  Remove Transceiver PID file on OpenBTS exit.
  Save transceiver PID to a file and use it to kill old transceivers.
  Correct comment for Server.WritePID.
  Set FD_CLOEXEC flag on all sockets.
  Stupid bug fixed - can't move stack variables initialization to a separate function.
  Gracefully shutdown OpenBTS on transceiver timeout/error.
  Make functions and variables in OpenBTS.cpp static to avoid their use outside of the file.
  Remove PID file on program exit.
  Implemented daemon mode, configured from config.
  Better default name for OpenBTS control UNIX socket.
  Initialize logger right after loading config file.
  Use normal cout and cerr while we have only one thread.
  Better comments for previous commit.
  Catch SIGINT, SIGTERM and SIGHUP and shutdown the server gracefully.
  Uncomment real BTS start/stop.
  ...
2011-06-21 19:02:19 -07:00
Thomas Tsou 3ea07de75c Merge branch 'sms-split'
* sms-split:
  smqueue: Add SMSC short code to smqueue.config.example
  Checking in forgotten smsc.cpp and smsc.h files.
  Ignore User-Data-Header in SMS TPDU when decoding text in TLUserData::encode7bit().
  Transparently pass TP-UHDI (User-Data-Header-Indicator) from SMS-SUBMIT to SMS-DELIVER.
  Slightly cleaner output in TLUserData::write().
  Log contents of a message instead of its memory addresss in SMS::parseTPDU().
  Use decoded text from original message in bounce and e-mail messages.
  More readable bounce message.
  Maximum SMS length is 160 symbols in default alphabet.
  Avoid duplication of "IMSI" in SC.Register.Msg.
  Set Log.Alarms.* values in smqueue config.
  Make "from" address for bounce messages configurable.
  Move most of the SMS processing to smqueue (initial check-in).
  Better documentation and error reporting for ThreadSemaphore.
  Implementation of Semaphore.
  Implemented "trans" CLI command to list all active transacions.
2011-06-21 19:02:10 -07:00
Alexander Chemeris f7d78ff578 Set FD_CLOEXEC flag on all sockets.
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.
2011-06-21 16:46:55 -07:00
Alexander Chemeris 7be28a2263 Initialize logger right after loading config file.
This avoids printing of log messages to the screen on program startup.
2011-06-21 16:46:55 -07:00
Alexander Chemeris 5ababfad65 A big patch implementing remote CLI.
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.
2011-06-21 16:46:54 -07:00
Alexander Chemeris 57d292d962 Better documentation and error reporting for ThreadSemaphore. 2011-06-21 15:30:44 -07:00
Alexander Chemeris 971b6ba700 Implementation of Semaphore. 2011-06-21 15:30:44 -07:00
Thomas Tsou baffdf3e65 uhd: fix seg fault at startup
On the E100, and possibly other systems, OpenBTS seg faults
at startup. The cause is a null reference to the global
logging file descriptor occuring due to an initializer order
dependency, which is not guaranteed across compilation
units.

When this occurs, check for for null and set the output to
stdout.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-04 23:08:25 -04:00
Alexander Chemeris 6423e707df common libs: Implemented ISLOGGING() macro to test whether given loglevel is going to be logged.
(cherry picked from commit d5e1c75147ef6d4bd6699c57250cc7b4def2e92b)
2010-12-21 18:29:23 +03:00
Alexander Chemeris a2ce7ae628 common libs: Implemented BitVector::unhex() which reads a hex string into a BitVector.
(cherry picked from commit d017dd20de029dbaa275335450728885f19ed01d)
2010-12-21 18:28:45 +03:00
Alexander Chemeris e2e267dcca common libs: Lower log level for "setting log path to " message.
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)
2010-12-21 18:13:05 +03:00
Alexander Chemeris 80963d1ed9 common libs: Use gethostbyname2_r() instead of gethostbyname() if available.
gethostbyname() is not thread-safe. It's recommended to use gethostbyname_r() or gethostbyname2_r() instead.

(cherry picked from commit f27e9581cdb6837f83d0aab467f0e5f83e814e7b)
2010-12-21 18:11:14 +03:00
Alexander Chemeris 0517600882 Zero file descriptors set before use.
(cherry picked from commit cc1e6635f58512ec1bc07f4a933d6535e2c75d7f)
2010-12-21 17:48:25 +03:00
Alexander Chemeris e8b244c306 Remove unused variable in BitVector::hex().
(cherry picked from commit 4ff6edb50ce90db31e66dba3f77e08259929f1ac)
2010-12-21 17:47:29 +03:00
Alexander Chemeris 955f6ca200 Move more code out of asserts.
This time I checked all occurrences of assert() and all others are ok, if I didn't miss anything

(cherry picked from commit 2afd3fd962eb89e08a73420542267191f459815f)
2010-12-21 17:45:55 +03:00
Alexander Chemeris 410d42eda0 Don't put real code into assert().
If you compile with optimization and NDEBUG is defined, then the whole assert() is replaced with ((void) 0) and your code is not executed at all.

Don't assert() on pthread_join() return value. If thread was not started yet, then pthread_join() will fail, but it's ok for us.

(cherry picked from commit d0b797e62c, 21a84dcec9cdf25657bba5c221aac9d4bb81d8b3, 8ed37a1f36e1b1266728647e715f95a28df3f900)
2010-12-21 17:42:09 +03:00
Alexander Chemeris f24e148432 Fix a bug with Timeval difference calculation on 64-bit Linux.
Subtracting uint32_t from uin32_t gives you uint32_t. And assigning result to a long doesn't make it a signed value, because on 64-bit Linux long is 64 bits.

(cherry picked from commit 82dd78d698)
2010-12-21 17:38:21 +03:00
Alexander Chemeris fc81223045 Fix a bunch of typos.
(cherry picked from commits 2da5a28a07, 6cddd36139. 7852c1e572abbc9fee2548a58e377cfbb3eff46d, f85d5b3f528ba19c598cbe77bad2566920bf9dd4, 0f8766a506f25118f732cca10fe44a1c9a0ace6a, 26adfe2d158e6a80d50b4e247c1539b5a07add9f)
2010-12-21 16:58:05 +03:00
Sylvain Munaut 50006e364d build: Remove all files autogenerated by autoreconf
Best practice is to not include those in repositories but only
in tar.gz dist tarball.

autoreconf -i will regenerate them

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-30 23:58:50 +01:00
Alexander Chemeris bac46e3b7d Better documentation and error reporting for ThreadSemaphore. 2010-09-29 10:48:25 +04:00
Alexander Chemeris d0b797e62c Don't put real code into assert().
If you compile with optimization and NDEBUG is defined, then the whole assert() is replaced with ((void) 0) and your code is not executed at all.
2010-09-29 10:29:26 +04:00
Alexander Chemeris 82dd78d698 Fix a bug with Timeval difference calculation on 64-bit Linux.
Subtracting uint32_t from uin32_t gives you uint32_t. And assigning result to a long doesn't make it a signed value, because on 64-bit Linux long is 64 bits.
2010-08-24 21:03:13 +04:00
Alexander Chemeris e139404884 Implementation of Semaphore. 2010-08-18 22:52:33 +04:00
David A. Burgess 3a8fd4fac1 Another fix to the copyright notice header. 2010-07-16 17:09:09 -07:00
David A. Burgess fa179f74b7 Change license to AGPLv3. 2010-07-04 15:28:06 -07:00
David A. Burgess ecbaf97509 Initial import of OpenBTS 2.6 for a new public trunk. 2010-05-23 19:42:16 -07:00