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"><<a href="mailto:daniel.junkmail@gmail.com">daniel.junkmail@gmail.com</a>></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'm not doing anything with extra processes. I'm making some other mistake. I've included the code for the module in its entirety. This is a module that I've been attempting to port from OpenSER-1.2. </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"><<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>></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. I think the problem may be in the way I'm initializing my module because I do get compiler warnings. Thanks for the help.<br>
<br>
-Daniel<br>
<br>
(gdb) bt full<br>
#0 0x20ec8353 in ?? ()<br>
No symbol table info available.<br>
#1 0x0809de2d in start_module_procs () at sr_module.c:560<br>
m = (struct sr_module *) 0x8179ad0<br>
n = 0<br>
l = 135742720<br>
x = 0<br>
__FUNCTION__ = "start_module_procs"<br>
#2 0x080633b9 in main_loop () at main.c:675<br>
i = 516746184<br>
pid = 134863859<br>
si = (struct socket_info *) 0x28<br>
chd_rank = 0<br>
__FUNCTION__ = "main_loop"<br>
#3 0x080655bd in main (argc=1, argv=0xbfbfec88) at main.c:1319<br>
cfg_log_stderr = 0<br>
cfg_stream = (FILE *) 0x28260e20<br>
c = -1<br>
r = 0<br>
tmp = 0xbfbfed04 "\004"<br>
tmp_len = 1<br>
port = 0<br>
proto = 0<br>
options = 0x80fc9ac "f:cCm:b:l:n:N:rRvdDETSVhw:t:u:g:P:G:W:"<br>
ret = -1<br>
seed = 2478508788<br>
rfd = 4<br>
---Type <return> to continue, or q <return> to quit---<br>
__FUNCTION__ = "main"<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 = '\0';<br>
<br>
static char *umgw = '\0';<br>
<br>
static char *dbhost = '\0';<br>
<br>
static char *dbuname = '\0';<br>
<br>
static char *dbpass = '\0';<br>
<br>
static char *dbname = '\0';<br>
<br>
static unsigned short dbport = 0;<br>
<br>
static char *vdbhost = '\0';<br>
<br>
static char *vdbuname = '\0';<br>
<br>
static char *vdbpass = '\0';<br>
<br>
static char *vdbname = '\0';<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>
{"pagefixup", pagemod_pagefixup, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },<br>
<br>
{"voicemail_transfer", pagemod_voicemail_transfer, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },<br>
<br>
{"check_passt", check_passt, 0, 0, REQUEST_ROUTE | BRANCH_ROUTE},<br>
<br>
{0, 0, 0, 0, 0}<br>
<br>
};<br>
<br>
<br>
/*<br>
<br>
* Script parameters<br>
<br>
*/<br>
<br>
static param_export_t mod_params[]=<br>
<br>
{<br>
<br>
{"gateway", STR_PARAM, &gateway},<br>
<br>
{"umgw", STR_PARAM, &umgw},<br>
<br>
{"dbhost", STR_PARAM, &dbhost},<br>
<br>
{"dbuname", STR_PARAM, &dbuname},<br>
<br>
{"dbpass", STR_PARAM, &dbpass},<br>
<br>
{"dbname", STR_PARAM, &dbname},<br>
<br>
{"dbport", INT_PARAM, &dbport},<br>
<br>
{"vdbhost", STR_PARAM, &dbhost},<br>
<br>
{"vdbuname", STR_PARAM, &dbuname},<br>
<br>
{"vdbpass", STR_PARAM, &dbpass},<br>
<br>
{"vdbname", STR_PARAM, &dbname},<br>
<br>
{"vdbport", INT_PARAM, &dbport},<br>
<br>
{0, 0, 0}<br>
<br>
};<br>
<br>
<br>
/*<br>
<br>
* fifo commands<br>
<br>
*/<br>
<br>
static mi_export_t mi_cmds[] =<br>
<br>
{<br>
<br>
{0, 0, 0, 0, 0}<br>
<br>
};<br>
<br>
<br>
/*<br>
<br>
* Export the statistics we have<br>
<br>
*/<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>
"page", /* module'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>
<br>
</blockquote>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br>