Commit Graph

134 Commits

Author SHA1 Message Date
Harald Welte 59b0468c5b move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00
Holger Freyther 761fdec21e 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 0573a739d0 [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 a2d7ae2671 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 c0279f8c38 * 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 5bc7c172ff Fix compilation issues on OS X - mainly #include file changes (Lars Immisch) 2009-05-21 07:23:02 +00:00
Holger Freyther e3283e8376 [db] Keep track of the current gsm_network 2009-04-19 06:35:16 +00:00
Holger Freyther 4b8eadf5d5 [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 ac213b2dcd 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 a162b6e346 [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 2b963ec268 [sms] Remove hardcoded size and use the SIZE_OF trick.. 2009-02-23 00:50:34 +00:00
Holger Freyther 91f49f6ab4 [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 ef39f02e8f [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 7aa4cfe030 [tests] Fix building... add another stub... 2009-02-10 23:36:57 +00:00
Holger Freyther 7e93e6e3b3 [tests] Fix the tests... link again 2009-02-06 22:16:52 +00:00
Holger Freyther 7410da4895 [tests] build fix 2009-01-27 19:09:38 +00:00
Holger Freyther 6e30972221 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 aa82f0dea2 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 c07e90d01c 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 c1e1192c2e Move the db_test.c to a specific test directory 2008-12-31 23:25:05 +00:00
Holger Freyther c5851c96b3 Make the test compile again 2008-12-31 23:24:37 +00:00
Daniel Willmann 3691ae11ad Implement sending SMS and send one on network registration 2008-12-29 04:20:41 +00:00
Daniel Willmann 4bac3ad596 ACK sms-submit 2008-12-29 01:54:02 +00:00
Holger Freyther ec5b1d8681 Add stubs to test gsm0408 functionality including LAI 2008-12-28 21:55:40 +00:00
Daniel Willmann 2e497db12f Add second test SMS 2008-12-28 21:38:26 +00:00
Harald Welte b1d452fb93 working state up to location update and classmark inquiry 2008-12-28 02:26:27 +00:00
Daniel Willmann b2208696cc Add SMS (GSM 04.11) testing program 2008-12-28 01:51:14 +00:00
Daniel Willmann 30cd3ecd42 Start implementing GSM 04.11 (short message service) 2008-12-28 00:31:09 +00:00
Daniel Willmann f7f22ac9dc sms.txt: Analyze CP-DATA, RP-DATA, TPDU 2008-12-27 23:37:16 +00:00
Harald Welte 361b535b2b sms 2008-12-27 21:46:23 +00:00
Holger Freyther 5b9c8c7170 Prefix debug symbols with debug_ to reduce the namesapce pollution 2008-12-27 12:46:49 +00:00
Holger Freyther c95546b3e1 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 e30a246433 Make the test timer a noinst program 2008-12-27 12:03:04 +00:00
Holger Freyther 1bad601135 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