Commit Graph

21 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther ae9d8d3131 smpp: Checking an array for NULL will always be false
The if (submit->short_message) and if (smsc->system_id) will
always be true.

Fixes: Coverity CID 1042371, CID 1042372
2013-07-14 09:04:50 +02:00
Harald Welte 995ff35f39 Fix license header at smpp_openbsc.c and smpp_smsc.c
As Holger pointed out, they contained a GPLv2+ disclaimer rather than
the AGPLv3+ which we use for OpenBSC.  This is not an incompaibility,
but was done unintentionally.  The code was always mean to be under
AGPLv3+.

Nevertheless, anyone using those two files in a version up to this
commit have the right to use it under GPLv2+ as well.  This is not
applicable for any versions after this commit.
2013-07-13 16:35:32 +02:00
Harald Welte 4c5babc06c smpp_openbsc: Fix parsing of 03.38 data coding scheme in MO case 2013-07-11 14:29:31 +02:00
Harald Welte c75ed6d593 SMPP: Add new 'dcs_transparent' ESME setting
If an ESME has the dcs_transparent config flag, then the TP-DCS
of MO-SMS is transparently passed to SMPP and not converted to SMPP
specific data_coding values.

This is needed in cases where ESMEs actually care about the exact
TP-DCS, as the conversion from TP-DCS to SMPP data_coding is not
bijective.
2013-05-28 20:59:25 +02:00
Harald Welte 27d5e65640 SMPP: Pass on 0xFx style DCS from SMPP to GSM
There are multiple ways how the TS 03.38 TP-DCS can indicate 8bit or
7bit messages.  SMPP has it's own data coding specification, which is
different from TS 03.38.

However, some SMPP ESMEs want to be able to have fine-grained control
over the TP-DCS indicated in the TPDU header.  If such values like 0xF6
are used in SMPP, we now transparently pass them on to the GSM side.
2013-05-28 20:37:07 +02:00
Harald Welte 3f78600346 SMPP: Implement SMPP Osmocom Estensions on MO-SMS
An ESME can now be configured in the VTY to enable osmocom-extensions,
which will add vendor-specific SMPP TLVs for RxLev/RxQual/ARFCN/IMEI and
transmit power to the SMPP DELIVER-SM message type.
2013-03-13 15:30:48 +01:00
Harald Welte 76afa16d04 SMPP: Fix crash on delivery of incoming SUBMIT-SM
As bsc_gsmnet is NULL at the time we call smpp_openbsc_init(),
we later run into segfaults with subscribers that don't have a
subscr->net set.

However, we cannot delay smpp_openbsc_init() until after
bsc_bootstrap_network(), as we then fail to parse the SMPP specific
VTY/config file options...
2013-03-13 15:30:48 +01:00
Holger Hans Peter Freyther 6a85c15eea smpp: Fix a memleak of the SMS on the submit path 2013-01-20 19:21:48 +01:00
Holger Hans Peter Freyther b5a4edd09b SMPP: Inform the SMS Queue that a SMS was submitted to kick the queue
Work on the 'forward' part.. tell the sms queue that something has been
submitted for it..

Conflicts:
	openbsc/src/libmsc/smpp_openbsc.c
2013-01-20 19:21:34 +01:00
Harald Welte 0d0c9ec5c5 use DLSMS and not DSMS in SMPP related code (merge with master) 2012-11-24 11:13:19 +01:00
Harald Welte b8a1f967c5 SMPP: fix handling of UDH / multi-part for 7-bit messages
... I would have never believed it is such a broken mindfuck.
2012-11-24 11:09:21 +01:00
Harald Welte c0de14da8f SMPP: add small utility program 'smpp_mirror'
This program binds as ESME transceiver to a SMSC and simply mirrors back
all SMS that it receives.
2012-11-24 11:09:21 +01:00
Harald Welte e07b6a77e5 SMPP: Implement support for MO SMS
Each ESME can have a number of prefix-matching routes, or it can
be a 'default route' to whcih all otherwise unknown SMS destinations
are routed.
2012-11-24 11:07:30 +01:00
Harald Welte 338e3b3b4b SMPP: VTY configuration of SMPP code, authentication support 2012-11-24 11:07:29 +01:00
Harald Welte 1a2993adb7 SMPP: fix subscriber reference leak.
subscr_get_by_* is already increasing the refcount, we shouldn't
do that a second time (thanks, Holger).
2012-11-16 22:00:10 +01:00
Harald Welte 9122c13933 SMPP: More logging in error cases, fix UDH in 7bit ASCII 2012-11-16 22:00:10 +01:00
Harald Welte 8a1b056bff SMPP: Implement ALERT NOTIFICATION on attach/detach of subscribers 2012-11-16 22:00:10 +01:00
Harald Welte 9ad0362429 SMPP: Deal with DCS according to 03.38 and respect TP-PID 2012-11-16 22:00:09 +01:00
Harald Welte e94db49698 SMPP: Introduce ESME reference coounting
In case a ESME disappears after SUBMIT-SM but before the MT-SMS
is delivered (transaction mode), we have to make sure the esme
structure still exists.
2012-11-16 22:00:09 +01:00
Harald Welte d4bdee79e9 SMPP: Implement transaction mode for SUBMIT-SM
WARNING: if the ESME disconnects, osmo_esme gets freed, and
sms->smpp.esme might point to invalid/unallocated memory!
2012-11-16 22:00:09 +01:00
Harald Welte f1033cc752 Initial support of SMPP interface for MT-SMS 2012-11-16 22:00:09 +01:00