Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I03918bd864c711b377a795186123c85bb6f4dc4a
|
|
This gives us working/safe zero termination without overflowing
the destination string size.
Change-Id: Ica6098ceba2bd01ce3b216085442cc5eed0ca507
|
|
Disable storing the SMS on disk. This is useful when scripting mobile.
Keep the default of attempting to store it to disk.
Change-Id: I6353447343d98ebaa5e12ab63f995750f81c8500
|
|
It seems the original code didn't allocate \0 for the string. Just use
talloc_asprintf and get a new string...
Change-Id: I8ffb50b04d2d6196caf0231711f3467abc8c5ea5
|
|
Before jumping to the failure handling code free the sms_file.
Change-Id: Ifce2bc130fe3a5bd49ad457ee61002952dd496ba
|
|
Make this symmetric and send the SMS through the primitive
interface. Construct and copy the sms into the prim, store
the SCA in the prim as well. In 04.11 we see we can store
2*10 digits in the destination address and a NUL.
Change-Id: I91d7537f4f6ce5ba00218c58f3456947ec7bc662
|
|
Inform the layer about new SMS and inform about the cause of
it. In both cases pass the SMS.
Change-Id: Ib7ab34b1b85b62ef0e8fff347adccbc5dc414161
|
|
The "msg->tail - msg->l4h" subtract two unsigned char*
pointers and should result in a ptrdiff_t. Fix the
compiler warning by using "%ti" in the printf.
Fixes:
gsm411_sms.c: In function ‘gsm411_rx_rp_ud’:
gsm411_sms.c:382:25: warning: format ‘%li’ expects argument of type ‘long int’, but argument 7 has type ‘int’ [-Wformat=]
LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h,
^
/home/ich/install/openbsc/include/osmocom/core/logging.h:93:54: note: in definition of macro ‘LOGPSRCC’
logp2(ss, level, caller_file, caller_line, cont, fmt, ##args); \
^~~
/home/ich/install/openbsc/include/osmocom/core/logging.h:47:2: note: in expansion of macro ‘LOGPSRC’
LOGPSRC(ss, level, NULL, 0, fmt, ## args)
^~~~~~~
gsm411_sms.c:382:2: note: in expansion of macro ‘LOGP’
LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h,
^~~~
gsm411_sms.c:382:25: warning: format ‘%li’ expects argument of type ‘long int’, but argument 7 has type ‘int’ [-Wformat=]
LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h,
^
/home/ich/install/openbsc/include/osmocom/core/logging.h:95:53: note: in definition of macro ‘LOGPSRCC’
logp2(ss, level, __BASE_FILE__, __LINE__, cont, fmt, ##args); \
^~~
/home/ich/install/openbsc/include/osmocom/core/logging.h:47:2: note: in expansion of macro ‘LOGPSRC’
LOGPSRC(ss, level, NULL, 0, fmt, ## args)
^~~~~~~
gsm411_sms.c:382:2: note: in expansion of macro ‘LOGP’
LOGP(DLSMS, LOGL_INFO, "TPDU(%li,%s)\n", msg->tail-msg->l4h,
Change-Id: Ia574fc7849bd00a94cf6651eb0d26fdc91ef1443
|
|
In I4bac5f06921b5fd85a98d97770d42d4858ca1c42 I have removed the
msg_ref field. But in case we delete a transaction with a pending
SMS we need to get the msg_ref from somewhere. This is a partial
revert but for RX SMS it makes sure that msg_ref will be set (it
wasn't set before).
Change-Id: I9b0f90f875de5f072565878861d38b0bb3bfbded
|
|
ms->shutdown is ms->shutdown != 0 which should have been
converted to ms->shutdown != MS_SHUTDOWN_NONE. This is fixing
sending SMS.
This was introduced in Iee1140e4848923c7270495c381bf87b7e3fddee1.
Change-Id: Ia74374dd9c0dd0ba9cf5725d66f4d2f2a2cfe9ef
|
|
It seemed like msg_ref could go out of sync. In some places we are
using sms->msg_ref in other cases we pass it as parameter (e.g. when
sending the SMS) or we get it out of the gsm411_rp_hdr.
Instead of hardcoding 42 for all messages make it configurable and
pass the parameter from the caller.
Change-Id: I4bac5f06921b5fd85a98d97770d42d4858ca1c42
|
|
The enum was created to understand the different states during
the shutdown and find places where it is used. The normal
transitions are like.
Idle -> Imsi Detach -> L1 Reset -> Done
Idle -> L1 Reset -> Done
The shutdown can get stuck in case:
* Out of memory situation while handling IMSI detach (timeout)
* Never receiving l1 reset acknnowledgment.
The code could benefit from the move to osmo fsm to deal with
proper timeouts.
Change-Id: Iee1140e4848923c7270495c381bf87b7e3fddee1
|
|
Change-Id: Id867ffed9b2b67025320d002e1e009e19c759a23
|
|
Since some 'gsm_7bit_*' functions were deprecated and replaced by
more secure ones with the '_n_' postfix in names, it's better to
use the updated functions.
Change-Id: I58150e9b74699e5f54b9a83416ad8efcb2eccd8e
|
|
The returned value of trans_assign_trans_id() must be stored into a
'int' rather than uint8_t to allow proper testing of negative return
values (errors).
Thanks to Bhaskar <niceguy108@gmail.com> for the original
patches.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
Here we just use the transaction ID
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
In case the SMS Service Center Address is not set in the config, the
Address from the SIM card is used. The mobile checks if either one is
defined, otherwise it will refuse sending SMS.
Since records of SIM are read, this patch includes fixes to talk
correctly with the SIM client.
Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
Both MO and MT SMS are supported.
Transmission an reception can be controlled via VTY:
en
sms 1 <destination> <text>
All received SMS are stored in "~/.osmocom/bb/sms.txt".
SMS transmission is performed on SAPI 3 datalink, using DCCH or ACCH.
Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|