<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    app_python didn't not have really a maintainer in the past years. If
    nobody from existing developers is willing to take over the
    maintenance/development of the module, then you can join and take
    care of it, committing directly. You will have to do it for at least
    one year.<br>
    <br>
    Let us know if it would interest you.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 12/4/12 6:14 PM, Konstantin M.
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAEYtTzeNoT649JiqrBh45ML6nfeb4HTc4sTNGqk7W7YxOu6Vxw@mail.gmail.com"
      type="cite">Hello,<br>
      <br>
      Added Module Properties:<br>
      &nbsp; Ranks:<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROC_MAIN&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; - Main ser process<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROC_TIMER&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; - Timer attendant process<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROC_RPC&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; - RPC type process<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROC_FIFO&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; - FIFO attendant process<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROC_TCP_MAIN&nbsp;&nbsp;&nbsp; - TCP main process<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROC_UNIXSOCK&nbsp;&nbsp;&nbsp; - Unix socket server<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROC_ATTENDANT&nbsp;&nbsp;&nbsp; - main "attendant" process<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROC_INIT&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; - special rank, the context is the main ser<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; process, but this is guaranteed to
      be executed<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; before any process is forked, so it
      can be used<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to setup shared variables that
      depend on some<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; after mod_init available
      information (e.g.<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; total number of processes).<br>
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @warning child_init(PROC_MAIN) is
      again called<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; in the same process (main), but latter<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (before tcp), so make sure you
      don't init things<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; twice, bot in PROC_MAIN and
      PROC_INT<br>
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROC_NOCHLDINIT&nbsp;&nbsp;&nbsp; - no child init functions will be called
      if this rank is used in fork_process()<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROC_SIPINIT&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; - First SIP worker - some modules do
      special processing in this child, like loading db data<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROC_SIPRPC&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; - Used to init RPC worker as SIP commands
      handler. Don't do any special processing in the<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; child init with this rank - just bare child
      initialization<br>
      &nbsp; &nbsp; &nbsp; PROC_MIN&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; - Minimum process rank<br>
      <br>
      Diff is attached.<br>
      <br>
      <div class="gmail_quote">2012/12/4 Ovidiu Sas <span dir="ltr">&lt;<a
            moz-do-not-send="true" href="mailto:osas@voipembedded.com"
            target="_blank">osas@voipembedded.com</a>&gt;</span><br>
        <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Second
          patch applied.<br>
          <br>
          Thanks,<br>
          Ovidiu<br>
          <div class="HOEnZb">
            <div class="h5"><br>
              On Mon, Dec 3, 2012 at 7:22 PM, Konstantin M. &lt;<a
                moz-do-not-send="true" href="mailto:evilzluk@gmail.com">evilzluk@gmail.com</a>&gt;
              wrote:<br>
              &gt; Sure, done, see 02_better_printing_stacktrace.diff
              &nbsp;attached.<br>
              &gt;<br>
              &gt;<br>
              &gt; 2012/12/4 Ovidiu Sas &lt;<a moz-do-not-send="true"
                href="mailto:osas@voipembedded.com">osas@voipembedded.com</a>&gt;<br>
              &gt;&gt;<br>
              &gt;&gt; Hello Konstantin,<br>
              &gt;&gt;<br>
              &gt;&gt; I applied the first patch. &nbsp;Thank you.<br>
              &gt;&gt; For the second patch, I would like to use the
              internal kamailio memory<br>
              &gt;&gt; manager: pkg_malloc and pkg_realloc instead of
              calloc and realloc.<br>
              &gt;&gt; Could you please rework the second patch and
              test?<br>
              &gt;&gt;<br>
              &gt;&gt; Thanks,<br>
              &gt;&gt; Ovidiu<br>
              &gt;&gt;<br>
              &gt;&gt; On Mon, Dec 3, 2012 at 6:14 PM, Konstantin M.
              &lt;<a moz-do-not-send="true"
                href="mailto:evilzluk@gmail.com">evilzluk@gmail.com</a>&gt;
              wrote:<br>
              &gt;&gt; &gt; Hello Ovidiu Sas,<br>
              &gt;&gt; &gt; Sure, I just removed this, see
              01_expand_log_facilities.diff attached.<br>
              &gt;&gt; &gt; Also I changed a printing of stack trace
              (see<br>
              &gt;&gt; &gt; 02_better_printing_stacktrace.diff)
              according to standard python's<br>
              &gt;&gt; &gt; traceback.<br>
              &gt;&gt; &gt;<br>
              &gt;&gt; &gt; Example of old printing:<br>
              &gt;&gt; &gt; &nbsp;0(4842) ERROR: app_python
              [python_support.c:38]: python_exec2:<br>
              &gt;&gt; &gt; Unhandled<br>
              &gt;&gt; &gt; exception in the Python code:<br>
              &gt;&gt; &gt; &nbsp;0(4842) ERROR: app_python
              [python_support.c:78]: &nbsp; &nbsp; &nbsp; Traceback (most<br>
              &gt;&gt; &gt; recent call last):<br>
              &gt;&gt; &gt; &nbsp;0(4842) ERROR: app_python
              [python_support.c:78]: &nbsp; &nbsp; &nbsp; &nbsp; File<br>
              &gt;&gt; &gt; "/opt/kamailio/python/Kam-Loggers.py", line
              34, in BuggyCode<br>
              &gt;&gt; &gt; &nbsp; &nbsp; return self.BuggyCode_lvl2(a)<br>
              &gt;&gt; &gt; &nbsp;0(4842) ERROR: app_python
              [python_support.c:78]: &nbsp; &nbsp; &nbsp; &nbsp; File<br>
              &gt;&gt; &gt; "/opt/kamailio/python/Kam-Loggers.py", line
              31, in BuggyCode_lvl2<br>
              &gt;&gt; &gt; &nbsp; &nbsp; return self.BuggyCode_lvl3(a)<br>
              &gt;&gt; &gt; &nbsp;0(4842) ERROR: app_python
              [python_support.c:78]: &nbsp; &nbsp; &nbsp; &nbsp; File<br>
              &gt;&gt; &gt; "/opt/kamailio/python/Kam-Loggers.py", line
              28, in BuggyCode_lvl3<br>
              &gt;&gt; &gt; &nbsp; &nbsp; return self.BuggyCode_lvl4(a)<br>
              &gt;&gt; &gt; &nbsp;0(4842) ERROR: app_python
              [python_support.c:78]: &nbsp; &nbsp; &nbsp; &nbsp; File<br>
              &gt;&gt; &gt; "/opt/kamailio/python/Kam-Loggers.py", line
              25, in BuggyCode_lvl4<br>
              &gt;&gt; &gt; &nbsp; &nbsp; return self.BuggyCode_lvl5(a)<br>
              &gt;&gt; &gt; &nbsp;0(4842) ERROR: app_python
              [python_support.c:78]: &nbsp; &nbsp; &nbsp; &nbsp; File<br>
              &gt;&gt; &gt; "/opt/kamailio/python/Kam-Loggers.py", line
              22, in BuggyCode_lvl5<br>
              &gt;&gt; &gt; &nbsp; &nbsp; a / 0<br>
              &gt;&gt; &gt; &nbsp;0(4842) ERROR: app_python
              [python_support.c:78]: &nbsp; &nbsp; &nbsp; TypeError:<br>
              &gt;&gt; &gt; unsupported operand type(s) for /:
              'Router.msg' and 'int'<br>
              &gt;&gt; &gt;<br>
              &gt;&gt; &gt;<br>
              &gt;&gt; &gt; Example of new printing:<br>
              &gt;&gt; &gt; &nbsp;0(4753) ERROR: app_python
              [python_support.c:95]: python_exec2:<br>
              &gt;&gt; &gt; Unhandled<br>
              &gt;&gt; &gt; exception in the Python code:<br>
              &gt;&gt; &gt; Traceback (most recent call last):<br>
              &gt;&gt; &gt; &nbsp; File
              "/opt/kamailio/python/Kam-Loggers.py", line 34, in
              BuggyCode<br>
              &gt;&gt; &gt; &nbsp; &nbsp; return self.BuggyCode_lvl2(a)<br>
              &gt;&gt; &gt; &nbsp; File
              "/opt/kamailio/python/Kam-Loggers.py", line 31, in
              BuggyCode_lvl2<br>
              &gt;&gt; &gt; &nbsp; &nbsp; return self.BuggyCode_lvl3(a)<br>
              &gt;&gt; &gt; &nbsp; File
              "/opt/kamailio/python/Kam-Loggers.py", line 28, in
              BuggyCode_lvl3<br>
              &gt;&gt; &gt; &nbsp; &nbsp; return self.BuggyCode_lvl4(a)<br>
              &gt;&gt; &gt; &nbsp; File
              "/opt/kamailio/python/Kam-Loggers.py", line 25, in
              BuggyCode_lvl4<br>
              &gt;&gt; &gt; &nbsp; &nbsp; return self.BuggyCode_lvl5(a)<br>
              &gt;&gt; &gt; &nbsp; File
              "/opt/kamailio/python/Kam-Loggers.py", line 22, in
              BuggyCode_lvl5<br>
              &gt;&gt; &gt; &nbsp; &nbsp; a / 0<br>
              &gt;&gt; &gt; TypeError: unsupported operand type(s) for
              /: 'Router.msg' and 'int'<br>
              &gt;&gt; &gt;<br>
              &gt;&gt; &gt;<br>
              &gt;&gt; &gt;<br>
              &gt;&gt; &gt; 2012/12/4 Ovidiu Sas &lt;<a
                moz-do-not-send="true"
                href="mailto:osas@voipembedded.com">osas@voipembedded.com</a>&gt;<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; Hello Konstantin,<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; I would be happy to commit your patch,
              but I would like to ask you to<br>
              &gt;&gt; &gt;&gt; remove, for now, the conditional FLAVOUR
              compilation.<br>
              &gt;&gt; &gt;&gt; You could leave the module name as
              "Router" for now.<br>
              &gt;&gt; &gt;&gt; Can you generate an new patch file
              without FLAVOUR?<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; Regards,<br>
              &gt;&gt; &gt;&gt; Ovidiu Sas<br>
              &gt;&gt; &gt;&gt;<br>
              &gt;&gt; &gt;&gt; On Mon, Dec 3, 2012 at 2:50 PM,
              Konstantin M. &lt;<a moz-do-not-send="true"
                href="mailto:evilzluk@gmail.com">evilzluk@gmail.com</a>&gt;<br>
              &gt;&gt; &gt;&gt; wrote:<br>
              &gt;&gt; &gt;&gt; &gt; Hi Dev,<br>
              &gt;&gt; &gt;&gt; &gt;<br>
              &gt;&gt; &gt;&gt; &gt; Modified app_python:<br>
              &gt;&gt; &gt;&gt; &gt;<br>
              &gt;&gt; &gt;&gt; &gt; 1) Added FLAVOUR support<br>
              &gt;&gt; &gt;&gt; &gt; 2) Added python objects:<br>
              &gt;&gt; &gt;&gt; &gt;<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; Module Properties:<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp;Log Levels:<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;L_ALERT<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;L_BUG<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;L_CRIT2<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;L_CRIT<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;L_ERR<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;L_WARN<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;L_NOTICE<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;L_INFO<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;L_DBG<br>
              &gt;&gt; &gt;&gt; &gt;<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp;Log Facilities:<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DEFAULT_FACILITY<br>
              &gt;&gt; &gt;&gt; &gt;<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; Module Methods:<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp;LM_GEN1(self, int log_level,
              str msg)<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp;LM_GEN2(self, int
              log_facility, int log_level, str msg)<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp;LM_ALERT(self, str msg)<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp;LM_CRIT(self, str msg)<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp;LM_ERR(self, str msg)<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp;LM_WARN(self, str msg)<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp;LM_NOTICE(self, str msg)<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp;LM_INFO(self, str msg)<br>
              &gt;&gt; &gt;&gt; &gt; &nbsp; &nbsp; &nbsp;LM_DBG(self, str msg)<br>
              &gt;&gt; &gt;&gt; &gt;<br>
              <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>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<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></pre>
  </body>
</html>