Change in osmo-msc[master]: sms_queue: Print dest msisdn instead of unknown subscriber

Pau Espin Pedrol gerrit-no-reply at
Tue Apr 9 10:55:30 UTC 2019

Pau Espin Pedrol has uploaded this change for review. (

Change subject: sms_queue: Print dest msisdn instead of unknown subscriber

sms_queue: Print dest msisdn instead of unknown subscriber

If subscriber is NULL, vlr_subscr_msisdn_or_name() returns string
"unknown", which is less informative than printing destination msisdn
expected for the queued sms.
This happens for instance if an sms was queued with Store&Forward and
destination subscriber is not currently registered

Change-Id: I4b8b54c9c41b17d4e1fa7ece63aa91a98036ef11
M src/libmsc/sms_queue.c
1 file changed, 7 insertions(+), 2 deletions(-)

  git pull ssh:// refs/changes/54/13554/1

diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c
index 274c712..d1a3018 100644
--- a/src/libmsc/sms_queue.c
+++ b/src/libmsc/sms_queue.c
@@ -192,6 +192,8 @@
+static const char*
 /* Find the next pending SMS by cycling through the recipients. We could also
  * cycle through the pending SMS, but that might cause us to keep trying to
  * send SMS to the same few subscribers repeatedly while not servicing other
@@ -205,6 +207,7 @@
 	int wrapped = 0;
 	int sanity = 100;
 	char started_with_msisdn[last_msisdn_buflen];
+	char *subscr_name;
 	OSMO_STRLCPY_ARRAY(started_with_msisdn, last_msisdn);
@@ -227,9 +230,11 @@
 		/* Is the subscriber attached? If not, go to next SMS */
 		if (!sms->receiver || !sms->receiver->lu_complete) {
+			subscr_name = sms->receiver ? vlr_subscr_msisdn_or_name(sms->receiver) :
+										  sms->dst.addr;
-			     "Subscriber %s is not attached, skipping SMS %llu\n",
-			     vlr_subscr_msisdn_or_name(sms->receiver), sms->id);
+			     "Subscriber %s%s is not attached, skipping SMS %llu\n",
+				 sms->receiver ? "" : "MSISDN-", subscr_name, sms->id);

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b8b54c9c41b17d4e1fa7ece63aa91a98036ef11
Gerrit-Change-Number: 13554
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list