laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/28134 )
Change subject: sms_queue: Use local variable rather than 9x pointer de-ref in function
......................................................................
sms_queue: Use local variable rather than 9x pointer de-ref in function
Change-Id: Idf6eb9ec6603a0643033396ed9227e4319724145
---
M src/libmsc/sms_queue.c
1 file changed, 10 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/34/28134/1
diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c
index a47f8e0..ff4940a 100644
--- a/src/libmsc/sms_queue.c
+++ b/src/libmsc/sms_queue.c
@@ -584,6 +584,7 @@
void *handler_data, void *signal_data)
{
struct gsm_network *network = handler_data;
+ struct gsm_sms_queue *smq = network->sms_queue;
struct sms_signal_data *sig_sms = signal_data;
struct gsm_sms_pending *pending;
struct vlr_subscr *vsub;
@@ -591,7 +592,7 @@
/* We got a new SMS and maybe should launch the queue again. */
if (signal == S_SMS_SUBMITTED || signal == S_SMS_SMMA) {
/* TODO: For SMMA we might want to re-use the radio connection. */
- sms_queue_trigger(network->sms_queue);
+ sms_queue_trigger(smq);
return 0;
}
@@ -604,26 +605,26 @@
* sms that are not in our control as we just have a channel
* open anyway.
*/
- pending = sms_find_pending(network->sms_queue, sig_sms->sms->id);
+ pending = sms_find_pending(smq, sig_sms->sms->id);
if (!pending)
return 0;
switch (signal) {
case S_SMS_DELIVERED:
- smsq_rate_ctr_inc(network->sms_queue, SMSQ_CTR_SMS_DELIVERY_ACK);
+ smsq_rate_ctr_inc(smq, SMSQ_CTR_SMS_DELIVERY_ACK);
/* Remember the subscriber and clear the pending entry */
vsub = pending->vsub;
vlr_subscr_get(vsub, __func__);
db_sms_delete_sent_message_by_id(pending->sms_id);
- sms_pending_free(network->sms_queue, pending);
+ sms_pending_free(smq, pending);
/* Attempt to send another SMS to this subscriber */
sms_send_next(vsub);
vlr_subscr_put(vsub, __func__);
break;
case S_SMS_MEM_EXCEEDED:
- smsq_rate_ctr_inc(network->sms_queue, SMSQ_CTR_SMS_DELIVERY_NOMEM);
- sms_pending_free(network->sms_queue, pending);
- sms_queue_trigger(network->sms_queue);
+ smsq_rate_ctr_inc(smq, SMSQ_CTR_SMS_DELIVERY_NOMEM);
+ sms_pending_free(smq, pending);
+ sms_queue_trigger(smq);
break;
case S_SMS_UNKNOWN_ERROR:
/*
@@ -637,12 +638,12 @@
* should flag the SMS as bad.
*/
if (sig_sms->paging_result) {
- smsq_rate_ctr_inc(network->sms_queue, SMSQ_CTR_SMS_DELIVERY_ERR);
+ smsq_rate_ctr_inc(smq, SMSQ_CTR_SMS_DELIVERY_ERR);
/* BAD SMS? */
db_sms_inc_deliver_attempts(sig_sms->sms);
sms_pending_failed(pending, 0);
} else {
- smsq_rate_ctr_inc(network->sms_queue, SMSQ_CTR_SMS_DELIVERY_TIMEOUT);
+ smsq_rate_ctr_inc(smq, SMSQ_CTR_SMS_DELIVERY_TIMEOUT);
sms_pending_failed(pending, 1);
}
break;
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28134
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Idf6eb9ec6603a0643033396ed9227e4319724145
Gerrit-Change-Number: 28134
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-msc/+/28132
to look at the new patch set (#2).
Change subject: sms: Encapsulate SMS queue related config parameters
......................................................................
sms: Encapsulate SMS queue related config parameters
Introduce a 'struct sms_queue_config' that holds all config parameters
related to the SMS queue.
Change-Id: I559ab7a6e0502a1a12a662ebd5591875d47ec7b2
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/sms_queue.h
M src/libmsc/msc_net_init.c
M src/libmsc/msc_vty.c
M src/libmsc/sms_queue.c
M src/osmo-msc/msc_main.c
6 files changed, 53 insertions(+), 38 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/32/28132/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28132
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I559ab7a6e0502a1a12a662ebd5591875d47ec7b2
Gerrit-Change-Number: 28132
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-msc/+/28133
to look at the new patch set (#2).
Change subject: sms: Give smsc its own VTY
......................................................................
sms: Give smsc its own VTY
The pre-historic sms_queue code used to have very strange aspects,
such as having some parameters (max-failure, max-pending) which could
only be sent from the 'enable' node, but not from a config file.
Before adding more configuration parameters, let's clean this up by
introducing a proper VTY config node for the 'smsc'; move the existing
config commands there and add new ones for max-failure and max-pending.
As the sms_queue data structure is only allocated after the config file
parsing happens, we are introducing a new 'sms_queue_config' data
structure. This encapsulates the public readable/writable config
parameters.
Change-Id: Ie8e0ab1a9f979337ff06544b9ab3820954d9804a
---
M include/osmocom/msc/sms_queue.h
M include/osmocom/msc/vty.h
M src/libmsc/Makefile.am
M src/libmsc/msc_vty.c
M src/libmsc/sms_queue.c
A src/libmsc/smsc_vty.c
M src/osmo-msc/msc_main.c
M tests/test_nodes.vty
8 files changed, 178 insertions(+), 73 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/33/28133/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28133
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ie8e0ab1a9f979337ff06544b9ab3820954d9804a
Gerrit-Change-Number: 28133
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: neels, laforge, keith.
Hello Jenkins Builder, neels, pespin, keith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-msc/+/28114
to look at the new patch set (#10).
Change subject: switch from libdbi to lbsqlite3
......................................................................
switch from libdbi to lbsqlite3
The choice of libdbi was one of the biggest early mistakes in (back
then) OpenBSC development. A database abstraction library that
prevents you from using proper prepared statements. Let's finally
abandon it and use sqlite3 directly, just like we do in osmo-hlr.
I decided to remove the database migration code as it would be relatively
cumbersome to port all of it to direct sqlite3 with prepared statements,
and it is prone to introduction of all kinds of errors. Since we don't
have a body of older database files and comprehensive migration tests,
it is safer to not offer migration code of uncertain quality. The last
schema revision (5) was introduced 5 years ago in 2017 (osmo-msc
v1.1.0), so it is considered an exceptionally rare case. People can
install osmo-msc 1.1.0 through 1.8.0 to upgrade to v5 before using
this new 'direct sqlite3' version of osmo-msc.
Change-Id: Ia334904289f92d014e7bd16b02b3b5817c12c790
Related: OS#5559, OS#5563, OS#5564
---
M configure.ac
M contrib/osmo-msc.spec.in
M debian/control
M include/osmocom/msc/db.h
M src/libmsc/db.c
M src/libmsc/sms_queue.c
M src/osmo-msc/Makefile.am
M src/osmo-msc/msc_main.c
M tests/db_sms/Makefile.am
M tests/db_sms/db_sms_test.c
M tests/sms_queue/Makefile.am
11 files changed, 664 insertions(+), 721 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/14/28114/10
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28114
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ia334904289f92d014e7bd16b02b3b5817c12c790
Gerrit-Change-Number: 28114
Gerrit-PatchSet: 10
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: keith <keith(a)rhizomatica.org>
Gerrit-MessageType: newpatchset
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28131 )
Change subject: stp: Fix sporadic failure in TC_ipa_to_m3ua_ni
......................................................................
stp: Fix sporadic failure in TC_ipa_to_m3ua_ni
It was spotted that from time to time the test set NI international
instead of national. This is presumable due to a race condition between
VTY and messages being received and forwarded.
Let's add some wait time to make sure everything happens in the proepr
order.
Change-Id: I3ef08447d2e36b6948d3db4ec9d1459beebc9384
---
M stp/STP_Tests.ttcn
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/31/28131/1
diff --git a/stp/STP_Tests.ttcn b/stp/STP_Tests.ttcn
index ac45b1d..1a3f775 100644
--- a/stp/STP_Tests.ttcn
+++ b/stp/STP_Tests.ttcn
@@ -143,7 +143,9 @@
var PDU_SCCP sccp := valueof(ts_SCCP_UDT(called, calling, data));
var octetstring sccp_enc := enc_PDU_SCCP(sccp);
f_vty_config2(VTY, {"cs7 instance 0"}, "network-indicator national");
+ f_sleep(1.0); /* Wait some time for the VTY transaction to finish */
f_IPA_send(3, sccp_enc);
+ f_sleep(1.0); /* Wait some time for the IPA msg to be forwarded before resetting. */
f_vty_config2(VTY, {"cs7 instance 0"}, "network-indicator international");
/* expect to receive it via M3UA */
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28131
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I3ef08447d2e36b6948d3db4ec9d1459beebc9384
Gerrit-Change-Number: 28131
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange