<p>Pau Espin Pedrol has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13554">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sms_queue: Print dest msisdn instead of unknown subscriber<br><br>If subscriber is NULL, vlr_subscr_msisdn_or_name() returns string<br>"unknown", which is less informative than printing destination msisdn<br>expected for the queued sms.<br>This happens for instance if an sms was queued with Store&Forward and<br>destination subscriber is not currently registered<br><br>Change-Id: I4b8b54c9c41b17d4e1fa7ece63aa91a98036ef11<br>---<br>M src/libmsc/sms_queue.c<br>1 file changed, 7 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/54/13554/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c</span><br><span>index 274c712..d1a3018 100644</span><br><span>--- a/src/libmsc/sms_queue.c</span><br><span>+++ b/src/libmsc/sms_queue.c</span><br><span>@@ -192,6 +192,8 @@</span><br><span>      }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+static const char*</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* Find the next pending SMS by cycling through the recipients. We could also</span><br><span>  * cycle through the pending SMS, but that might cause us to keep trying to</span><br><span>  * send SMS to the same few subscribers repeatedly while not servicing other</span><br><span>@@ -205,6 +207,7 @@</span><br><span>       int wrapped = 0;</span><br><span>     int sanity = 100;</span><br><span>    char started_with_msisdn[last_msisdn_buflen];</span><br><span style="color: hsl(120, 100%, 40%);">+ char *subscr_name;</span><br><span> </span><br><span>       OSMO_STRLCPY_ARRAY(started_with_msisdn, last_msisdn);</span><br><span> </span><br><span>@@ -227,9 +230,11 @@</span><br><span> </span><br><span>                 /* Is the subscriber attached? If not, go to next SMS */</span><br><span>             if (!sms->receiver || !sms->receiver->lu_complete) {</span><br><span style="color: hsl(120, 100%, 40%);">+                 subscr_name = sms->receiver ? vlr_subscr_msisdn_or_name(sms->receiver) :</span><br><span style="color: hsl(120, 100%, 40%);">+                                                                                  sms->dst.addr;</span><br><span>                  LOGP(DLSMS, LOGL_DEBUG,</span><br><span style="color: hsl(0, 100%, 40%);">-                      "Subscriber %s is not attached, skipping SMS %llu\n",</span><br><span style="color: hsl(0, 100%, 40%);">-                         vlr_subscr_msisdn_or_name(sms->receiver), sms->id);</span><br><span style="color: hsl(120, 100%, 40%);">+                             "Subscriber %s%s is not attached, skipping SMS %llu\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                                 sms->receiver ? "" : "MSISDN-", subscr_name, sms->id);</span><br><span>                    sms_free(sms);</span><br><span>                       continue;</span><br><span>            }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13554">change 13554</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13554"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I4b8b54c9c41b17d4e1fa7ece63aa91a98036ef11 </div>
<div style="display:none"> Gerrit-Change-Number: 13554 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>