aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-04 12:34:51 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-04 13:09:01 +0200
commit03ded61060e78d5a604c7c955247e2a1b1863008 (patch)
treea5e6db30ac6ead8e9401cc0124b0bc3206feebab
parent26d0326157ca88abb3e7888b541c304b1d012648 (diff)
debug log for SMS
-rw-r--r--openbsc/src/libmsc/sms_queue.c9
-rw-r--r--openbsc/src/libmsc/vty_interface_layer3.c1
2 files changed, 9 insertions, 1 deletions
diff --git a/openbsc/src/libmsc/sms_queue.c b/openbsc/src/libmsc/sms_queue.c
index 5dbe81f2..ebc53c23 100644
--- a/openbsc/src/libmsc/sms_queue.c
+++ b/openbsc/src/libmsc/sms_queue.c
@@ -225,10 +225,14 @@ static void sms_submit_pending(void *_data)
sms = take_next_sms(smsq);
- if (!sms)
+ if (!sms) {
+ LOGP(DLSMS, LOGL_DEBUG, "Sending SMS done (%d attempted)\n",
+ attempted);
break;
+ }
rounds += 1;
+ LOGP(DLSMS, LOGL_DEBUG, "Sending SMS round %d\n", rounds);
/*
* This code needs to detect a loop. It assumes that no SMS
@@ -243,6 +247,8 @@ static void sms_submit_pending(void *_data)
first_sub = sms->receiver->id;
initialized = 1;
} else if (first_sub == sms->receiver->id) {
+ LOGP(DLSMS, LOGL_DEBUG, "Sending SMS done (loop) (%d attempted)\n",
+ attempted);
sms_free(sms);
break;
}
@@ -324,6 +330,7 @@ no_pending_sms:
*/
int sms_queue_trigger(struct gsm_sms_queue *smsq)
{
+ LOGP(DLSMS, LOGL_DEBUG, "Triggering SMS queue\n");
if (osmo_timer_pending(&smsq->push_queue))
return 0;
diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c
index 529a6bad..e4e01d27 100644
--- a/openbsc/src/libmsc/vty_interface_layer3.c
+++ b/openbsc/src/libmsc/vty_interface_layer3.c
@@ -172,6 +172,7 @@ static int _send_sms_str(struct gsm_subscriber *receiver,
sms_free(sms);
return CMD_WARNING;
}
+ LOGP(DLSMS, LOGL_DEBUG, "SMS stored in DB\n");
sms_free(sms);
sms_queue_trigger(receiver->group->net->sms_queue);