osmo-msc/openbsc/src/libmsc
Holger Hans Peter Freyther 900394acf3 db: Avoid crash we have seen with the dbi code when reading a SMS
Avoid a crash when reading a SMS and a Subscriber could not be resolved.
It is not clear why the read was failing. The sender_id and the receiver_id
was valid for the given sms. I assume that the database has been locked
due external access to it.

The side-effect is that in case of such a failure the sms_queue will start
to deliver starting from subscriber id = 0 again.

 #1  0x0000000000428bec in sms_from_result (net=0x156a270, result=0x15eda30) at db.c:1146
 #2  0x000000000042a8e0 in db_sms_get_unsent_by_subscr (net=0x156a270,
     min_subscr_id=<optimized out>, failed=<optimized out>) at db.c:1255
 #3  0x000000000042e900 in take_next_sms (smsq=<optimized out>) at sms_queue.c:193
 #4  sms_submit_pending (_data=0x158e300) at sms_queue.c:227
 #5  0x00007f3fd30de3bc in osmo_timers_update () at timer.c:243
 #6  0x00007f3fd30de69b in osmo_select_main (polling=0) at select.c:133
 #7  0x0000000000406fbc in main (argc=9, argv=<optimized out>) at bsc_hack.c:346
 (gdb) frame 1
 #1  0x0000000000428bec in sms_from_result (net=0x156a270, result=0x15eda30) at db.c:1146
 1146		strncpy(sms->src.addr, sms->sender->extension, sizeof(sms->src.addr)-1);
 (gdb) p *sms
 (gdb) p sms->sender
 $1 = (struct gsm_subscriber *) 0x0
 (gdb) p sender_id
 $2 = <optimized out>
2013-12-27 20:20:55 +01:00
..
Makefile.am smpp: Fix the make distcheck for smpp 2013-09-19 11:08:43 +02:00
auth.c src: use namespace prefix osmo_* for misc utils 2011-05-07 12:58:59 +02:00
db.c db: Avoid crash we have seen with the dbi code when reading a SMS 2013-12-27 20:20:55 +01:00
gsm_04_08.c lu crash: Fix a crash that likely occurred during the LU procedure 2013-12-27 17:37:27 +01:00
gsm_04_11.c Revert "gsm_04_11: Speculative fix for MT SMS and SAPI 'n Reject" 2013-12-27 16:32:59 +01:00
gsm_04_80.c ussd: Move to use gsm_7bit_encode_n_ussd for USSD encoding 2013-12-26 22:17:45 +01:00
gsm_subscriber.c db: Remove the struct gsm_network from the database layer 2013-10-13 13:44:54 +02:00
mncc.c misc: Remove sys/types.h includes from the files 2011-04-18 17:31:39 +02:00
mncc_builtin.c CC: Be sure to allocate call instance with talloc_zero() 2013-01-25 08:36:32 +01:00
mncc_sock.c mncc: Include size and offsets of struct gsm_mncc in the hello 2012-01-15 00:40:42 +01:00
osmo_msc.c expiration: Speculative fixes for the periodic expiring handling 2013-07-27 21:39:13 +02:00
rrlp.c src: use namespace prefix osmo_signal* 2011-05-06 12:12:31 +02:00
silent_call.c sms: Use the DLSMS instead of the DSMS category throughout our code 2012-11-21 21:33:03 +01:00
smpp_openbsc.c SMPP: use VTY setting for E212/E164 in ALERT NOTIFICATION 2013-08-03 19:20:37 +02:00
smpp_smsc.c misc: Fix compilation warnings 2013-07-27 20:03:08 +02:00
smpp_smsc.h smpp: Move the coding/mode detection into a utils file 2013-07-27 20:03:10 +02:00
smpp_utils.c smpp: Move the coding/mode detection into a utils file 2013-07-27 20:03:10 +02:00
smpp_vty.c vty: Use vty_install_default() instead of bsc_install_default() 2013-10-30 15:19:00 +01:00
sms_queue.c sms: Use the DLSMS instead of the DSMS category throughout our code 2012-11-21 21:33:03 +01:00
token_auth.c libmsc: Allow to set sender id when sending SMS from the VTY 2013-01-01 17:04:38 +01:00
transaction.c libmsc: Set the "trans->conn" to NULL to catch invalid usage 2013-12-27 18:07:23 +01:00
ussd.c ussd: Fix test for RELEASE COMPLETE 2013-10-15 13:29:25 +02:00
vty_interface_layer3.c vty: Use vty_install_default() instead of bsc_install_default() 2013-10-30 15:19:00 +01:00