osmo-msc/openbsc/tests
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
..
abis Makefile.am: Use AM_CPPFLAGS 2013-06-12 09:16:27 +02:00
bsc bsc/mminfo: Patch timezone and DST in MM Info messages 2013-09-19 10:57:13 +02:00
bsc-nat mgcp/nat: Take payload type from SDP data 2013-12-05 10:28:48 +01:00
bsc-nat-trie nat: Fix make distcheck for the nat 2013-09-19 11:01:14 +02:00
channel db: Avoid crash we have seen with the dbi code when reading a SMS 2013-12-27 20:20:55 +01:00
db build: db_test does not use dlopen/dlsym.. remove LIBRARY_DL from deps 2013-12-13 10:18:33 +01:00
gbproxy gbproxy: Fix handling of NSEI changes 2013-10-24 18:02:38 +02:00
gprs Makefile.am: Use AM_CPPFLAGS 2013-06-12 09:16:27 +02:00
gsm0408 Makefile.am: Use AM_CPPFLAGS 2013-06-12 09:16:27 +02:00
mgcp mgcp/rtp: Only patch timestamp alignment errors 2013-12-19 11:56:11 +01:00
si si: Make sure to not overwrite orig_arfcn_hi in the range encoding 2013-12-12 17:00:57 +01:00
smpp smpp: Fix the make distcheck for smpp 2013-09-19 11:08:43 +02:00
trau Add EFR support to TRAU muxer + test case 2013-12-19 10:12:28 +01:00
Makefile.am Add EFR support to TRAU muxer + test case 2013-12-19 10:12:28 +01:00
atlocal.in bsc/mminfo: Patch timezone and DST in MM Info messages 2013-09-19 10:57:13 +02:00
ctrl_test_runner.py bsc: Add control command to set timezone 2013-10-01 17:25:44 +02:00
sms.txt move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00
testsuite.at Add EFR support to TRAU muxer + test case 2013-12-19 10:12:28 +01:00
vty_test_runner.py bsc: Add a VTY command to show the paging group for a BSC/IMSI 2013-11-22 16:00:00 +01:00