Commit Graph

35 Commits

Author SHA1 Message Date
Neels Hofmeyr 218e4b4aa0 move openbsc/* to repos root
This is the first step in creating this repository from the legacy openbsc.git.

Like all other Osmocom repositories, keep the autoconf and automake files in
the repository root. openbsc.git has been the sole exception, which ends now.

Change-Id: I9c6f2a448d9cb1cc088cf1cf6918b69d7e69b4e7
2017-08-27 03:52:43 +02:00
Harald Welte 13e10daa33 move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00
Holger Freyther c7b86f9011 Revert "[db] Keep track of the current gsm_network"
This was a stupid decision. We will have to assign the
network at some other place. The problem will be a problem
when we have two gsm_networks in one process and the same
subscriber is traveling in both networks.
2009-06-06 13:54:20 +00:00
Holger Freyther 535abf2f40 [tests] Do no free objects that are allocated on the stack
gcc4.4 warns about these kind of objects. Fix that.
2009-06-06 13:54:02 +00:00
Harald Welte 04d3c9224f An application that has own events and file descriptors, must poll
select function ob libbsc. A "polling" flag is used to enable polling.
In this case select() will not sleep until file descriptor events occurr
or nearest timer expires. Also a return value will indicate if there was
an event that has been handled. If there was an event, the application
decides to poll again and don't wait.

In case for bsc_hack, the polling flag is not set. select will sleep as
usual.

(Andreas Eversberg)
2009-05-23 06:07:04 +00:00
Harald Welte ff117a8d11 * rename the timer functions to avoid name collisions with libmisdn.
* the return value of bsc_update_timers() is required for applications to find out if a timer was fired
(Andreas Eversberg)
2009-05-23 05:22:08 +00:00
Harald Welte 12247c6713 Fix compilation issues on OS X - mainly #include file changes (Lars Immisch) 2009-05-21 07:23:02 +00:00
Holger Freyther 36650b872f [db] Keep track of the current gsm_network 2009-04-19 06:35:16 +00:00
Holger Freyther bab9cd9a27 [tests] Change the db_test to link to the libopenbsc.a
This should keep the test compiling in the future. It will
link to the libopenbsc.a to get all symbols. We do this in
the other tests too.
2009-04-12 05:37:07 +00:00
Harald Welte 7e310b12ff Store incoming SMS into SQL database
* gsm_util now uses caller-allocated data (rather than callee-allocated)
* correctly parse destination address
* parse (but not transcode) non-default encodings of SMS
* reject SMS to unknown destination number
* resolve target subscriber id and store incoming SMS (without header) in 'sms' table

What we're now missing is the sending part, i.e. a regular task iterating over
all pending SMS and trying to deliver them.  Also, check for pending SMS once
we get a LOCATION UPDATE.
2009-03-30 20:56:32 +00:00
Holger Freyther 59da07bd0e [sms] Add test case for the 7-bit coding/decoding...
we don't pass it yet.
2009-02-23 00:50:38 +00:00
Holger Freyther 73e61c4cd6 [sms] Remove hardcoded size and use the SIZE_OF trick.. 2009-02-23 00:50:34 +00:00
Holger Freyther 3281f6e233 [build] Create a libbsc.a as noinst_LIBRARY, link bsc_hack and tests against it
Link the tests against the libbsc.a to avoid most of the breakage
when creating new symbols.
2009-02-20 18:33:00 +00:00
Holger Freyther 0df0f87740 [misc] Another set of build fixes...
We should compile the src into an archive file and
then link to it.
2009-02-11 00:33:51 +00:00
Holger Freyther a6cd26cdae [tests] Fix building... add another stub... 2009-02-10 23:36:57 +00:00
Holger Freyther 72b250b779 [tests] Fix the tests... link again 2009-02-06 22:16:52 +00:00
Holger Freyther fde3114fb5 [tests] build fix 2009-01-27 19:09:38 +00:00
Holger Freyther 5f234e4f3a Add test case that is not registering the timer again
yesterday's crash with the llist_del instead of using del_timer
was due this kind of bug. Add a test case.
2009-01-04 03:45:13 +00:00
Holger Freyther 12aa50d5a2 Change the subscriber and database backend
gsm_subscriber is now refcounted, the db backend is leaking
a lot less, db_get_subscriber will allocate the subscr record
now, subscr_* will look up a subscriber in the list of currently
active subscribers and add an ref to this one.

The db test cases pass, more testing will be when next to the bts
2009-01-01 18:02:05 +00:00
Holger Freyther 67b4b9a017 Do not call rsl_chan_release directly but use the use_count of the lchan
Call use_lchan early in allocate_loc_updating_req, do not directly call
rsl_chan_release but go through channel alloc to take the use_count into
account.
2009-01-01 03:46:11 +00:00
Holger Freyther dbede4e414 Move the db_test.c to a specific test directory 2008-12-31 23:25:05 +00:00
Holger Freyther 6dbca34bd3 Make the test compile again 2008-12-31 23:24:37 +00:00
Daniel Willmann 6fe997e9dd Implement sending SMS and send one on network registration 2008-12-29 04:20:41 +00:00
Daniel Willmann 471712b133 ACK sms-submit 2008-12-29 01:54:02 +00:00
Holger Freyther aa0fb362c0 Add stubs to test gsm0408 functionality including LAI 2008-12-28 21:55:40 +00:00
Daniel Willmann 6e6143e292 Add second test SMS 2008-12-28 21:38:26 +00:00
Harald Welte 255539c742 working state up to location update and classmark inquiry 2008-12-28 02:26:27 +00:00
Daniel Willmann fdd0a6c157 Add SMS (GSM 04.11) testing program 2008-12-28 01:51:14 +00:00
Daniel Willmann 8b3390effd Start implementing GSM 04.11 (short message service) 2008-12-28 00:31:09 +00:00
Daniel Willmann f3c8e11336 sms.txt: Analyze CP-DATA, RP-DATA, TPDU 2008-12-27 23:37:16 +00:00
Harald Welte a6eb9f0213 sms 2008-12-27 21:46:23 +00:00
Holger Freyther 5ee72eeeb1 Prefix debug symbols with debug_ to reduce the namesapce pollution 2008-12-27 12:46:49 +00:00
Holger Freyther d546e31628 Add code to parse a debug category string
Use strdup to be able to use strtok on the category string and add
a test case. Also safe some more information to be able to use color
in the print statement.
2008-12-27 12:03:07 +00:00
Holger Freyther 42f50bb3ee Make the test timer a noinst program 2008-12-27 12:03:04 +00:00
Holger Freyther 5f75598c28 Introduce a simple timer API....
One can use add_timer or schedule_timer to add a timer. After
the timeout time has been reached the callback will be called.
One can call add_time/schedule_timer and del_timer from within
the callback.
2008-12-27 09:42:59 +00:00