<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-hlr/+/16214">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">hlr_vty_subscr: prettier output for last LU seen<br><br>Extend the "last LU seen on ..." line with the amount of seconds that<br>passed since now, or "(invalid timestamp)".<br><br>Patch split from Id7fc50567211a0870ac0524f6dee94d4513781ba, because it<br>depends on timestamp_age which was just added in<br>Ife4a61d71926d08f310a1aeed9d9f1974f64178b.<br><br>Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37<br>---<br>M src/hlr_vty_subscr.c<br>1 file changed, 5 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/14/16214/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c</span><br><span>index 6eac989..b8eba4d 100644</span><br><span>--- a/src/hlr_vty_subscr.c</span><br><span>+++ b/src/hlr_vty_subscr.c</span><br><span>@@ -54,8 +54,11 @@</span><br><span>         char datebuf[26]; /* for ctime_r(3) */</span><br><span>       if (!last_lu_seen)</span><br><span>           return;</span><br><span style="color: hsl(0, 100%, 40%);">- vty_out(vty, "    last LU seen on %s: %s UTC%s", domain_label, get_datestr(&last_lu_seen, datebuf),</span><br><span style="color: hsl(0, 100%, 40%);">-               VTY_NEWLINE);</span><br><span style="color: hsl(120, 100%, 40%);">+ vty_out(vty, "    last LU seen on %s: %s UTC", domain_label, get_datestr(&last_lu_seen, datebuf));</span><br><span style="color: hsl(120, 100%, 40%);">+      if (!timestamp_age(&last_lu_seen, &age))</span><br><span style="color: hsl(120, 100%, 40%);">+              vty_out(vty, " (invalid timestamp)%s", VTY_NEWLINE);</span><br><span style="color: hsl(120, 100%, 40%);">+        else</span><br><span style="color: hsl(120, 100%, 40%);">+          vty_out(vty, " (%us ago)%s", age, VTY_NEWLINE);</span><br><span> }</span><br><span> </span><br><span> static void subscr_dump_full_vty(struct vty *vty, struct hlr_subscriber *subscr)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-hlr/+/16214">change 16214</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/c/osmo-hlr/+/16214"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-hlr </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I24f9e86c1aa0b1576290094e024562f41b988f37 </div>
<div style="display:none"> Gerrit-Change-Number: 16214 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>