<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Andrei Pelinescu-Onciul a &eacute;crit&nbsp;:
<blockquote cite="mid:20100614151145.GN22857@ape.fokus.gmd.de"
 type="cite">
  <pre wrap="">On Jun 14, 2010 at 17:07, marius zbihlei <a class="moz-txt-link-rfc2396E" href="mailto:marius.zbihlei@1and1.ro">&lt;marius.zbihlei@1and1.ro&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap=""><a class="moz-txt-link-abbreviated" href="mailto:jerome.marchet@orange-ftgroup.com">jerome.marchet@orange-ftgroup.com</a> wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Hi all,


I use Kamailio 3.0.0 currently, but I have a problem with the
topoh module.


Indeed, I want to create an exported function called &laquo;
topoh_required &raquo;( so, to be used in the config file) for this
module, I read and execute the instruction of the devel guide to
do this:


in topoh_mod.c, I add or modify:


int th_param_mask = 0;


...


static cmd_export_t cmds[] = {

{"topoh_required", (cmd_function)m_topoh, 1, fixup_uint_null ,
REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE},

{0, 0, 0, 0, 0}

};

      </pre>
    </blockquote>
    <pre wrap="">Hello Jerome,

It seems the prototype is wrong in the devel guide.

The cmd_export_t should have 6 members instead of 5. It works with

static cmd_export_t cmds[] = {

{"topoh_required", (cmd_function)m_topoh, 1, fixup_uint_null , 0,
REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|LOCAL_ROUTE},

{0, 0, 0, 0, 0, 0}

};


Can you give me the exact URL of the docs so I can also update them?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Actually it depends on which module interface one uses.
The ser modules interface uses 5 parameters, while the kamailio one 6
 (kamailio has an extra free_fixup).
To find out what version a module uses:
grep MOD_INTERFACE modules*/mod_name/Makefile .

Andrei
  </pre>
</blockquote>
<br>
Ok Thank you for you answer Marius and Andrei. I thought this module
interface used only&nbsp; 5 parameters. In the devel guide, the example is
with 6 parameters. <br>
<br>
<a class="moz-txt-link-freetext" href="http://www.asipto.com/pub/kamailio-devel-guide/#c16_add_cmd_function">http://www.asipto.com/pub/kamailio-devel-guide/#c16_add_cmd_function</a><br>
<br>
But when I studied the code of Sanity module,&nbsp; only 5 parameters&nbsp; are
used for sanity_check.<br>
<br>
static cmd_export_t cmds[] = {<br>
&nbsp;&nbsp;&nbsp; {"sanity_check", (cmd_function)sanity_check, 0, 0, REQUEST_ROUTE},<br>
&nbsp;&nbsp;&nbsp; {"sanity_check", (cmd_function)sanity_check, 1, sanity_fixup,
REQUEST_ROUTE},<br>
&nbsp;&nbsp;&nbsp; {"sanity_check", (cmd_function)sanity_check, 2, sanity_fixup,
REQUEST_ROUTE},<br>
&nbsp;&nbsp;&nbsp; {0, 0, 0, 0}<br>
};<br>
<br>
That why i made this mistake<br>
<br>
Sorry<br>
<br>
and thank you for your help.<br>
<br>
Regards,<br>
<br>
J&eacute;r&ocirc;me<br>
</body>
</html>