<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>I checked the code and the parameter has to be a static string,
      not variables. Probably it works because the pointer of the
      evaluated variable maps over the pointer where the static string
      would be referenced in the internal function param structure. But
      it can have side effects.</p>
    <p>We can eventually add a function to support variables in the
      parameter.</p>
    <p>With the current stable release, the solution is using an
      embedded interpreter, like app_jsdt:</p>
    <p>jsdt_dostring('KSR.hdr.remove("$var(x)")');</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 27.05.20 01:04, Cinthia Leung wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+J76DgVfKboOhO3Drfi+rYEOLBE2meAqEjszDP8ACvCkTE3Fg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>I'm trying to use this textops function with a variable, ie
          remove_hf($var(x)).  I know the documentation does not
          explicitly say that variables are allowed, but it works.</div>
        <div><br>
        </div>
        <div>However, it's throwing the following error:</div>
        <div>textops [textops.c:3431]: hname_fixup(): using hdr type
          name <P-Top-Secret></div>
        <div><core> [core/mem/q_malloc.c:487]: qm_free(): WARNING:
          free(0) called from core: core/action.c: do_action(1132)<br>
        </div>
        <div><br>
        </div>
        <div>Is it something you'd highly recommend against doing? 
          Thanks.</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Cindy</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
  </body>
</html>