Forgot to CC devel on this.<br><br><div class="gmail_quote">On Fri, Nov 14, 2008 at 10:21 AM, Daniel Corbe <span dir="ltr">&lt;<a href="mailto:daniel.junkmail@gmail.com">daniel.junkmail@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<div><br></div><div>I&#39;m not doing anything with extra processes. &nbsp;I&#39;m making some other mistake. &nbsp;I&#39;ve included the code for the module in its entirety. &nbsp;This is a module that I&#39;ve been attempting to port from OpenSER-1.2. &nbsp;</div>

<div><br></div><div><a href="http://rafb.net/p/VNa26v78.html" target="_blank">http://rafb.net/p/VNa26v78.html</a><br></div><font color="#888888"><div><br></div><div>-Daniel</div></font><div><div></div><div class="Wj3C7c">
<div><br><div class="gmail_quote">On Fri, Nov 14, 2008 at 1:09 AM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Daniel,<br>
<br>
Is your module registering a extra process? the crash happens when the core tries to call the pre_fork function for your extra process. Could you post the extra process structure ?<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Daniel Corbe wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>
Hi,<br>
<br>
I tried compiling with -ggdb to get a useful backtrace and I got nothing. &nbsp;I think the problem may be in the way I&#39;m initializing my module because I do get compiler warnings. &nbsp;Thanks for the help.<br>
<br>
-Daniel<br>
<br>
(gdb) bt full<br>
#0 &nbsp;0x20ec8353 in ?? ()<br>
No symbol table info available.<br>
#1 &nbsp;0x0809de2d in start_module_procs () at sr_module.c:560<br>
 &nbsp; &nbsp; &nbsp; &nbsp;m = (struct sr_module *) 0x8179ad0<br>
 &nbsp; &nbsp; &nbsp; &nbsp;n = 0<br>
 &nbsp; &nbsp; &nbsp; &nbsp;l = 135742720<br>
 &nbsp; &nbsp; &nbsp; &nbsp;x = 0<br>
 &nbsp; &nbsp; &nbsp; &nbsp;__FUNCTION__ = &quot;start_module_procs&quot;<br>
#2 &nbsp;0x080633b9 in main_loop () at main.c:675<br>
 &nbsp; &nbsp; &nbsp; &nbsp;i = 516746184<br>
 &nbsp; &nbsp; &nbsp; &nbsp;pid = 134863859<br>
 &nbsp; &nbsp; &nbsp; &nbsp;si = (struct socket_info *) 0x28<br>
 &nbsp; &nbsp; &nbsp; &nbsp;chd_rank = 0<br>
 &nbsp; &nbsp; &nbsp; &nbsp;__FUNCTION__ = &quot;main_loop&quot;<br>
#3 &nbsp;0x080655bd in main (argc=1, argv=0xbfbfec88) at main.c:1319<br>
 &nbsp; &nbsp; &nbsp; &nbsp;cfg_log_stderr = 0<br>
 &nbsp; &nbsp; &nbsp; &nbsp;cfg_stream = (FILE *) 0x28260e20<br>
 &nbsp; &nbsp; &nbsp; &nbsp;c = -1<br>
 &nbsp; &nbsp; &nbsp; &nbsp;r = 0<br>
 &nbsp; &nbsp; &nbsp; &nbsp;tmp = 0xbfbfed04 &quot;\004&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;tmp_len = 1<br>
 &nbsp; &nbsp; &nbsp; &nbsp;port = 0<br>
 &nbsp; &nbsp; &nbsp; &nbsp;proto = 0<br>
 &nbsp; &nbsp; &nbsp; &nbsp;options = 0x80fc9ac &quot;f:cCm:b:l:n:N:rRvdDETSVhw:t:u:g:P:G:W:&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;ret = -1<br>
 &nbsp; &nbsp; &nbsp; &nbsp;seed = 2478508788<br>
 &nbsp; &nbsp; &nbsp; &nbsp;rfd = 4<br>
---Type &lt;return&gt; to continue, or q &lt;return&gt; to quit---<br>
 &nbsp; &nbsp; &nbsp; &nbsp;__FUNCTION__ = &quot;main&quot;<br>
<br>
<br>
page.h:38: warning: initialization from incompatible pointer type<br>
page.h:38: warning: initialization makes pointer from integer without a cast<br>
page.h:39: warning: initialization from incompatible pointer type<br>
page.h:39: warning: initialization makes pointer from integer without a cast<br>
page.h:40: warning: initialization from incompatible pointer type<br>
page.h:40: warning: initialization makes pointer from integer without a cast<br>
page.h:89: warning: initialization from incompatible pointer type<br>
page.h:91: warning: initialization from incompatible pointer type<br>
page.h:93: warning: initialization from incompatible pointer type<br>
<br>
<br>
/* Function prototypes */ <br>
static int mod_init(void);<br>
<br>
static void mod_destroy(void);<br>
<br>
static int child_init(int);<br>
<br>
static int pagemod_pagefixup(struct sip_msg *m, char *unused1, char *unused2);<br>
<br>
static int pagemod_voicemail_transfer(struct sip_msg *m, char *unused1, char *unused2);<br>
<br>
static int replace_to_uri(struct sip_msg *msg, str *uri);<br>
<br>
static int check_passt(struct sip_msg *m, char *unused1, char *unused2);<br>
<br>
<br>
/* Exported module paramaters */<br>
<br>
static char *gateway = &#39;\0&#39;;<br>
<br>
static char *umgw = &#39;\0&#39;;<br>
<br>
static char *dbhost = &#39;\0&#39;;<br>
<br>
static char *dbuname = &#39;\0&#39;;<br>
<br>
static char *dbpass = &#39;\0&#39;;<br>
<br>
static char *dbname = &#39;\0&#39;;<br>
<br>
static unsigned short dbport = 0;<br>
<br>
static char *vdbhost = &#39;\0&#39;;<br>
<br>
static char *vdbuname = &#39;\0&#39;;<br>
<br>
static char *vdbpass = &#39;\0&#39;;<br>
<br>
static char *vdbname = &#39;\0&#39;;<br>
<br>
static unsigned short vdbport = 0;<br>
<br>
<br>
/* Make SER happy */<br>
<br>
MODULE_VERSION<br>
<br>
<br>
/* SER exports */<br>
<br>
static cmd_export_t cmds[]=<br>
<br>
{<br>
<br>
{&quot;pagefixup&quot;, pagemod_pagefixup, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },<br>
<br>
{&quot;voicemail_transfer&quot;, pagemod_voicemail_transfer, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },<br>
<br>
{&quot;check_passt&quot;, check_passt, 0, 0, REQUEST_ROUTE | BRANCH_ROUTE},<br>
<br>
{0, 0, 0, 0, 0}<br>
<br>
};<br>
<br>
&nbsp;<br>
/*<br>
<br>
&nbsp;* Script parameters<br>
<br>
&nbsp;*/<br>
<br>
static param_export_t mod_params[]=<br>
<br>
{<br>
<br>
{&quot;gateway&quot;, STR_PARAM, &amp;gateway},<br>
<br>
{&quot;umgw&quot;, STR_PARAM, &amp;umgw},<br>
<br>
{&quot;dbhost&quot;, STR_PARAM, &amp;dbhost},<br>
<br>
{&quot;dbuname&quot;, STR_PARAM, &amp;dbuname},<br>
<br>
{&quot;dbpass&quot;, STR_PARAM, &amp;dbpass},<br>
<br>
{&quot;dbname&quot;, STR_PARAM, &amp;dbname},<br>
<br>
{&quot;dbport&quot;, INT_PARAM, &amp;dbport},<br>
<br>
{&quot;vdbhost&quot;, STR_PARAM, &amp;dbhost},<br>
<br>
{&quot;vdbuname&quot;, STR_PARAM, &amp;dbuname},<br>
<br>
{&quot;vdbpass&quot;, STR_PARAM, &amp;dbpass},<br>
<br>
{&quot;vdbname&quot;, STR_PARAM, &amp;dbname},<br>
<br>
{&quot;vdbport&quot;, INT_PARAM, &amp;dbport},<br>
<br>
{0, 0, 0}<br>
<br>
};<br>
<br>
<br>
/*<br>
<br>
&nbsp;* fifo commands<br>
<br>
&nbsp;*/<br>
<br>
static mi_export_t mi_cmds[] =<br>
<br>
{<br>
<br>
{0, 0, 0, 0, 0}<br>
<br>
};<br>
<br>
<br>
/*<br>
<br>
&nbsp;* Export the statistics we have<br>
<br>
&nbsp;*/<br>
<br>
static stat_export_t mod_stats[] = <br>
{<br>
<br>
{0, 0, 0}<br>
<br>
};<br>
<br>
<br>
struct module_exports exports = <br>
{<br>
<br>
&quot;page&quot;, /* module&#39;s name */<br>
<br>
DEFAULT_DLFLAGS, /* dlopen() fkags */<br>
<br>
cmds, /* exported functions */<br>
<br>
mod_params, /* param exports */<br>
<br>
mod_stats, /* exported statistics */<br>
<br>
mi_cmds, /* exported MI functions */<br>
<br>
0, /* exported pseudo variables */<br>
<br>
mod_init, /* module initialization function */<br>
<br>
0, /* reply processing function FIXME Not sure when this is used */<br>
<br>
mod_destroy, /* Destroy function */<br>
<br>
child_init /* per-child init function */<br>
<br>
};<br>
<br>
<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.opensips.org" target="_blank">Devel@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a><br>
 &nbsp;<br>
</blockquote>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br>