<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    I just pushed your patch, with a small update: when there is no
    limit wanted, instead of 'limit=-1' is now 'limit=0xffffffff --
    limit is unsigned it and some compilers and analysing tools issue
    warning when detecting working with negative values in such cases --
    the behavior stays the same.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 22/08/14 11:25, Alekzander
      Spiridonov wrote:<br>
    </div>
    <blockquote
cite="mid:CA+=mPaov55q-orH9RDkVu80Y_=FFkGymXy=6sNim4srhR2+qcw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi Daniel,<br>
              <br>
            </div>
            1. Yep, had the same concern, but somehow missed the
            app_lua. Fixed as you've described.<br>
            <br>
          </div>
          2. Done.<br>
          <br>
        </div>
        New patch attached.<br>
      </div>
      <div class="gmail_extra">
        <br>
        <br>
        <div class="gmail_quote">2014-08-21 20:19 GMT+04:00
          Daniel-Constantin Mierla <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:miconda@gmail.com"
              target="_blank">miconda@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
              <br>
              thanks for sending the patch! Two remarks for now:<br>
              <br>
              1) you changed the inter-module API prototype for
              ds_select_dst_f, respectively:<br>
              <br>
               typedef int (*ds_select_dst_f)(struct sip_msg *msg, int
              set,<br>
              -            int alg, int mode);<br>
              +            int alg, unsigned int limit, int mode);<br>
              <br>
              I think the reason for that function is an export to
              app_lua (and maybe other embedded languages). With this
              change, things get broken there. I would do:<br>
              <br>
              - rename the function ds_select_dst() to
              ds_select_dst_limit()<br>
              - add ds_select_dst() as a wrapper function calling the
              new ds_select_dst_limit()<br>
              <br>
              The API stay unchanged, and eventually one can add a new
              member for ds_select_dst_limit() when needed<br>
              <br>
              Otherwise, the change of ds_select_dst() prototype should
              involve reviewing other modules and seeing if people are
              happy with this change, because it breaks existing
              embedded scripts.<br>
              <br>
              2) You need to document the new functions exported to
              kamailio config, in
              modules/dispatcher/doc/dispatcher_admin.xml<br>
              <br>
              Once the patch is overall ok, I can commit it to the
              repository.<br>
              <br>
              Cheers,<br>
              Daniel
              <div>
                <div class="h5"><br>
                  <br>
                  <div>On 21/08/14 17:40, Alekzander Spiridonov wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">
                      <div>
                        <div>Hi list,<br>
                          <br>
                        </div>
                        I'd like to propose a patch that allows user to
                        limit the number of items that appears in
                        dst_avp after ds_select_dst or ds_select_domain
                        call.<br>
                        <br>
                      </div>
                      There are some use cases when one could have
                      couple of dst sets and would like to failover from
                      the first to another without checking all items
                      but have just 3 or 4 of them dead in a row.<br>
                      <br>
                      What do you think about that?<br clear="all">
                      <br>
                      -- <br>
                      <div>
                        <div>Best regards,<br>
                          Alekzander Spiridonov</div>
                        <br>
                      </div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><span class="HOEnZb"><font color="#888888">
</font></span></pre>
                <span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
              <span class="HOEnZb"><font color="#888888"> <br>
                  <pre cols="72">-- 
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA</pre>
                </font></span></div>
            <br>
            _______________________________________________<br>
            sr-dev mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev"
              target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        <div>
          <div>Best regards,<br>
            Alekzander Spiridonov</div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA</pre>
  </body>
</html>