<p></p>
<p>looks as trim to not strip all trailing symbols.<br>
I have tested</p>
<div class="highlight highlight-source-diff"><pre><span class="pl-c1">diff --git a/src/modules/lost/functions.c b/src/modules/lost/functions.c</span>
index c94c7883f0..b152b08300 100644
<span class="pl-md">--- a/src/modules/lost/functions.c</span>
<span class="pl-mi1">+++ b/src/modules/lost/functions.c</span>
<span class="pl-mdr">@@ -290,6 +290,9 @@</span> int lost_held_function(struct sip_msg *_m, char *_con, char *_pidf, char *_url,
                                if(xmlStrcmp(cur_node->name,
                                                        (const xmlChar *)"locationUriSet") == 0) {
 
<span class="pl-mi1"><span class="pl-mi1">+</span>                                       str test = {"test\n", 5};</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>                                       trim(&test);</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>                                       LM_WARN("'%s' after\n", test.s);</span>
                                        LM_DBG("*** node '%s' found\n", cur_node->name);
 
                                        /* get the locationUri element */</pre></div>
<p>This produce message in log</p>
<pre><code> 1(8906) WARNING: lost [functions.c:307]: lost_held_function(): 'test
' after
</code></pre>
<p>This produce</p>
<pre><code>
Looks as trailing `\n` not removed.
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2569#issuecomment-736865447">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZII2HSNBXBZ4TE4LO3SSVWD7ANCNFSM4UHW5LHQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZI33S5H34PA5LFEZS3SSVWD7A5CNFSM4UHW5LH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFPV2ZJY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2569#issuecomment-736865447",
"url": "https://github.com/kamailio/kamailio/issues/2569#issuecomment-736865447",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>