aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
AgeCommit message (Collapse)AuthorFilesLines
2010-12-26HACK / unfinished: persistent storage of SGSN statelaforge/gprs_persistentHarald Welte2-0/+106
2010-12-26[SGSN] Fix processing of RA Update Request regarding TLLIHarald Welte2-1/+27
In case we get a RA UPD REQ on a new cell (both served by the same SGSN), the LLC stack should not allocate a ne LLE/LLME, as the latter would reset the V(u)sent / V(u)recv to zero and make the MS discard our responses. Instead, whenever the LLC stack sees a foreign TLLI, it should always convert it to the local TLLI before doing any lookup for a LLE/LLME.
2010-12-26MNCC: fix copy+paste mistake in log message and change it to DEBUGHarald Welte1-1/+1
2010-12-26mncc_sock: Fix potential segfault in case MNCC app diesHarald Welte2-1/+4
We create a loop by not setting trans->callref = 0 before calling trans_free(), as the latter would again send a MNCC_REL_IND up the stack. Also: Fix memory leak in case we try to read from mncc_sock but socket is just gone.
2010-12-26mncc_sock: Use proper logging directives and levels, don't printf.Harald Welte1-5/+14
2010-12-26MNCC: Introduce bsc_hack argument '-m' for enabling MNCC socketHarald Welte1-2/+14
2010-12-26mncc_sock: Add new 'mncc handler' functionHarald Welte1-0/+33
This adds mncc_sock_from_cc() as a handler function for CC messages to be passed to the MNCC interface. If there is no MNCC socket registered, we immediately release any CC related messages. Together with flushing all established CC transaction at MNCC socket close time, this ensures that all resources are released and no new resources can be established until the MNCC applicaiton has re-attached.
2010-12-26MNCC: pass the actual 'struct msgb' down the mncc_recv() callbackHarald Welte4-8/+11
this is required as we no longer have a dequeue-handler that can take care of free()ing the message after passing it to the MNCC handler.
2010-12-26GSM 04.08 / MNCC interface: verbuse logging of incoming MNCC primitivesHarald Welte1-5/+22
2010-12-26mncc_sock: Clear all calls if MNCC application (LCR) disconnectsHarald Welte2-1/+15
2010-12-26mncc_sock: Add an assert() in case our queue peek trick goes wrongHarald Welte1-2/+5
2010-12-26MNCC: remove 'upqueue'Harald Welte3-21/+4
The MNCC messages now again get directly handled by the net->mncc_recv() callback. If the callee wants to put them in a queue, it' his business to do that.
2010-12-26MNCC: move cc_tx_to_mncc() from gsm_data.h into mncc.cHarald Welte1-0/+5
2010-12-26MNCC socket: Export MNCC interface via unix domain socketHarald Welte2-1/+290
Using this code we will soon be able to use LCR or other MNCC applications via a unix domain socket. The code is not actually used yet after this patch.
2010-12-26MNCC: rename mncc_send() to mncc_tx_to_cc()Harald Welte2-21/+21
This name clearly indicates: MNCC api transmits to Call Control, i.e. down from the L4/application into the L3 04.08 code.
2010-12-26MNCC: split into generic mncc.c and mncc_builtin.cHarald Welte3-365/+403
The built-in code to handle call switching inside OpenBSC is now in mncc_builtin.c, whereas some core/utility functions remain in mncc.c
2010-12-26MNCC: make get_call_ref() function staticHarald Welte1-1/+1
2010-12-26MNCC: clarify naming / rename mncc_recv() to int_mncc_recv()Harald Welte2-2/+3
the int_ perfix (internal) symbolizes that this is the internal MNCC handler code, receiving messages from the MNCC interface point.
2010-12-26MNCC: rename mncc_upq_enqueue() to cc_tx_to_mncc()Harald Welte3-3/+3
The new function name clearly indicates: The Call Control (TS 04.08, msc-side in OpenBSC) wants to transmit something to the MNCC interface.
2010-12-26sms: Make sure that this loop is broken from time to time.Holger Hans Peter Freyther1-3/+5
2010-12-26sms: Rewrite the queue to find SMS harder.Holger Hans Peter Freyther1-3/+25
With the old code it was possible that we first saw SMS that we have already in the queue. In that case we had free slots available but have not filled them. With his new loop we try harder to find SMS we can send, it attempts (and should work) to detect a loop to break the loop before finding SMS to deliver.
2010-12-26sms: Move the finding of the next SMS to handle to a new methodHolger Hans Peter Freyther1-9/+20
Prepare changing the loop to fill all the available slots. Set the last subscriber based on the SMS query.
2010-12-26sms: Change the default values for the sms_queueHolger Hans Peter Freyther2-2/+2
Increase the number of SMS we will try to send at a time and decrease the failures we handle before going to the next item. With the default timeout we will attempt to page the subscriber for 60 seconds and we can increase the queue speed by going to the next item faster.
2010-12-26sms: Workaround a bug in the db layer and update the dataHolger Hans Peter Freyther1-0/+3
The sync with the database might fail. Reread the updated subscriber after we have written it. The source of this failure is unknown.
2010-12-26sms: Always go through the database and the smsqueue to send messagesHolger Hans Peter Freyther1-8/+7
This is also fixing a memory and subscriber leak. Make sure to always release the gsm_sms structure.
2010-12-26sms: Allow setting amount of failures through the vty.Holger Hans Peter Freyther2-0/+20
2010-12-26sms: Make the amount of failures configurable as well.Holger Hans Peter Freyther1-1/+3
2010-12-26sms: Add vty command to clear the pending messageHolger Hans Peter Freyther2-0/+25
2010-12-26sms: Make the max_pending tunable via a vty runtime settingHolger Hans Peter Freyther2-0/+20
Make it possible to change the max pending via the vty. This can be useful to play with the performance of the queue.
2010-12-26sms: Add vty command to trigger running the queue.Holger Hans Peter Freyther2-1/+12
Allow to manually trigger running the queue. This can be useful if SMS were manually added to the database or such.
2010-12-26sms: Provide some simple vty command for the state of the SMS queueHolger Hans Peter Freyther2-0/+29
2010-12-26sms: Begin sending SMS messages, handle failuresHolger Hans Peter Freyther1-2/+298
The sms queue will attempt to send one SMS per subscriber to fill all the available slots. It will handle the case where paging has not started, timed out or if there was any kind of other failure. It is also retransmitting SMS in case of failures.
2010-12-26sms: Introduce a SMS queue that will be responsible for deliveryHolger Hans Peter Freyther4-33/+103
The SMSqueue will be responsible of sending to the user. It will do so in a loop and will also try not to overload the BTS. This means the throughput of SMS will be limited.
2010-12-26sms: Create signal data for SMS with more informationHolger Hans Peter Freyther2-13/+27
This is providing access to the paging result, the sms, the transaction. This will allow the SMS queue to do decisions based on the source of the failure.
2010-12-26sms: Dispatch a failed signal in many of the MT-sms pointsHolger Hans Peter Freyther1-2/+10
This attempts to dispatch a signal whenever a MT-sms is failing. In some cases, e.g. with freeing the transaction, this will also happen for MO-sms.
2010-12-26sms: Use the SMS in the signals where it makes sense.Holger Hans Peter Freyther1-2/+2
The signal_data was inconsistent. Sometimes we passed the transaction and sometimes we passed the sms. Change it to always pass the sms. The S_SMS_SMMA is a bit special as it does not involve any SMS.
2010-12-25sms: Fix a small typo.Holger Hans Peter Freyther1-1/+1
2010-12-25db: Introduce a limit in delivery attempts for the SMS searchHolger Hans Peter Freyther2-4/+7
We do not want to attempt submitting SMS that has failed for too many times. The failure could be due RF failure or due a bug in the message handling.
2010-12-25db: Add method to load a SMS by id.Holger Hans Peter Freyther1-0/+22
2010-12-25subscr: Sync the database before sending the attached signalHolger Hans Peter Freyther1-1/+10
If a signal handler accesses the database he will still see the old lac. Make sure he is seeing the new one. Update the subscriber from the database in case the query failed or other things have changed.
2010-12-25subscr: Print the lac of the subscriber.Holger Hans Peter Freyther1-0/+2
2010-12-25paging: Introduce a GSM_PAGING_BUSY event for a special timeoutHolger Hans Peter Freyther5-2/+13
Start counting the attempts of each paging request and call the callback with the PAGING_BUSY type when the paging request timed out but the subscriber was not paged at all. This can only happen with a huge paging backlog. In case the system has so many pending paging
2010-12-24subscr: Add a VTY command to update the subscriber from the database.Holger Hans Peter Freyther3-19/+78
2010-12-24subscr: Add VTY command to purge subscribers that are held in memoryHolger Hans Peter Freyther1-0/+14
Call the subscr_purge_inactive function and mention how many subscribers were removed from the RAM.
2010-12-24subscr: Introduce VTY option to keep subscribers in ram.Holger Hans Peter Freyther1-0/+14
2010-12-24subscr: Introduce subscr_purge_inactive to free unused subscribersHolger Hans Peter Freyther1-0/+15
Introduce a method that will remove all subscribers that have a zero use count. This is useful if someone wants to purge subscribers from memory or wants to disable the everything in RAM feature.
2010-12-24subscr: Make it possible to keep subscribers in RAM.Holger Hans Peter Freyther1-1/+1
This is implemented by not freeing the subscriber when the reference count becomes smaller than zero. We hope that this will save many database accesses during the congres.
2010-12-24BSC Call Control: Actually implement call statisticsHarald Welte3-7/+17
The existing call realated statistics counters apparently were never used. This introduces a new set of counters, two for the MO and MT case.
2010-12-24BSC VTY: Print some more of the already-generated statisticsHarald Welte1-0/+7
2010-12-24SGSN / GMM: Only allow non-roaming IMSIsHarald Welte1-1/+10
As we do not yet use the HLR from the SGSN, we allow all MS to attach to our GPRS network. However, if this is running in a public environment, it could cause service interruption to users of commercial GPRS networks. Thus, we now check if the first 5 digits of the IMSI match the MCC/MNC of the cell that they want to register to. Thus, any subscribers with SIM cards from real operators will no longer be accepted.