I'm doing something to cause opensips to crash

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

I'm doing something to cause opensips to crash

Daniel Corbe
Hi,

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.

-Daniel

(gdb) bt full
#0  0x20ec8353 in ?? ()
No symbol table info available.
#1  0x0809de2d in start_module_procs () at sr_module.c:560
        m = (struct sr_module *) 0x8179ad0
        n = 0
        l = 135742720
        x = 0
        __FUNCTION__ = "start_module_procs"
#2  0x080633b9 in main_loop () at main.c:675
        i = 516746184
        pid = 134863859
        si = (struct socket_info *) 0x28
        chd_rank = 0
        __FUNCTION__ = "main_loop"
#3  0x080655bd in main (argc=1, argv=0xbfbfec88) at main.c:1319
        cfg_log_stderr = 0
        cfg_stream = (FILE *) 0x28260e20
        c = -1
        r = 0
        tmp = 0xbfbfed04 "\004"
        tmp_len = 1
        port = 0
        proto = 0
        options = 0x80fc9ac "f:cCm:b:l:n:N:rRvdDETSVhw:t:u:g:P:G:W:"
        ret = -1
        seed = 2478508788
        rfd = 4
---Type <return> to continue, or q <return> to quit---
        __FUNCTION__ = "main"


page.h:38: warning: initialization from incompatible pointer type
page.h:38: warning: initialization makes pointer from integer without a cast
page.h:39: warning: initialization from incompatible pointer type
page.h:39: warning: initialization makes pointer from integer without a cast
page.h:40: warning: initialization from incompatible pointer type
page.h:40: warning: initialization makes pointer from integer without a cast
page.h:89: warning: initialization from incompatible pointer type
page.h:91: warning: initialization from incompatible pointer type
page.h:93: warning: initialization from incompatible pointer type


/* Function prototypes */ 

static int mod_init(void);

static void mod_destroy(void);

static int child_init(int);

static int pagemod_pagefixup(struct sip_msg *m, char *unused1, char *unused2);

static int pagemod_voicemail_transfer(struct sip_msg *m, char *unused1, char *unused2);

static int replace_to_uri(struct sip_msg *msg, str *uri);

static int check_passt(struct sip_msg *m, char *unused1, char *unused2);


/* Exported module paramaters */

static char *gateway = '\0';

static char *umgw = '\0';

static char *dbhost = '\0';

static char *dbuname = '\0';

static char *dbpass = '\0';

static char *dbname = '\0';

static unsigned short dbport = 0;

static char *vdbhost = '\0';

static char *vdbuname = '\0';

static char *vdbpass = '\0';

static char *vdbname = '\0';

static unsigned short vdbport = 0;


/* Make SER happy */

MODULE_VERSION


/* SER exports */

static cmd_export_t cmds[]=

{

{"pagefixup", pagemod_pagefixup, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },

{"voicemail_transfer", pagemod_voicemail_transfer, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },

{"check_passt", check_passt, 0, 0, REQUEST_ROUTE | BRANCH_ROUTE},

{0, 0, 0, 0, 0}

};

 

/*

 * Script parameters

 */

static param_export_t mod_params[]=

{

{"gateway", STR_PARAM, &gateway},

{"umgw", STR_PARAM, &umgw},

{"dbhost", STR_PARAM, &dbhost},

{"dbuname", STR_PARAM, &dbuname},

{"dbpass", STR_PARAM, &dbpass},

{"dbname", STR_PARAM, &dbname},

{"dbport", INT_PARAM, &dbport},

{"vdbhost", STR_PARAM, &dbhost},

{"vdbuname", STR_PARAM, &dbuname},

{"vdbpass", STR_PARAM, &dbpass},

{"vdbname", STR_PARAM, &dbname},

{"vdbport", INT_PARAM, &dbport},

{0, 0, 0}

};


/*

 * fifo commands

 */

static mi_export_t mi_cmds[] =

{

{0, 0, 0, 0, 0}

};


/*

 * Export the statistics we have

 */

static stat_export_t mod_stats[] = 

{

{0, 0, 0}

};


struct module_exports exports = 

{

"page", /* module's name */

DEFAULT_DLFLAGS, /* dlopen() fkags */

cmds, /* exported functions */

mod_params, /* param exports */

mod_stats, /* exported statistics */

mi_cmds, /* exported MI functions */

0, /* exported pseudo variables */

mod_init, /* module initialization function */

0, /* reply processing function FIXME Not sure when this is used */

mod_destroy, /* Destroy function */

child_init /* per-child init function */

};



_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: I'm doing something to cause opensips to crash

Bogdan-Andrei Iancu
Hi Daniel,

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 ?

Regards,
Bogdan

Daniel Corbe wrote:

> Hi,
>
> 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.
>
> -Daniel
>
> (gdb) bt full
> #0  0x20ec8353 in ?? ()
> No symbol table info available.
> #1  0x0809de2d in start_module_procs () at sr_module.c:560
>         m = (struct sr_module *) 0x8179ad0
>         n = 0
>         l = 135742720
>         x = 0
>         __FUNCTION__ = "start_module_procs"
> #2  0x080633b9 in main_loop () at main.c:675
>         i = 516746184
>         pid = 134863859
>         si = (struct socket_info *) 0x28
>         chd_rank = 0
>         __FUNCTION__ = "main_loop"
> #3  0x080655bd in main (argc=1, argv=0xbfbfec88) at main.c:1319
>         cfg_log_stderr = 0
>         cfg_stream = (FILE *) 0x28260e20
>         c = -1
>         r = 0
>         tmp = 0xbfbfed04 "\004"
>         tmp_len = 1
>         port = 0
>         proto = 0
>         options = 0x80fc9ac "f:cCm:b:l:n:N:rRvdDETSVhw:t:u:g:P:G:W:"
>         ret = -1
>         seed = 2478508788
>         rfd = 4
> ---Type <return> to continue, or q <return> to quit---
>         __FUNCTION__ = "main"
>
>
> page.h:38: warning: initialization from incompatible pointer type
> page.h:38: warning: initialization makes pointer from integer without
> a cast
> page.h:39: warning: initialization from incompatible pointer type
> page.h:39: warning: initialization makes pointer from integer without
> a cast
> page.h:40: warning: initialization from incompatible pointer type
> page.h:40: warning: initialization makes pointer from integer without
> a cast
> page.h:89: warning: initialization from incompatible pointer type
> page.h:91: warning: initialization from incompatible pointer type
> page.h:93: warning: initialization from incompatible pointer type
>
>
> /* Function prototypes */
>
> static int mod_init(void);
>
> static void mod_destroy(void);
>
> static int child_init(int);
>
> static int pagemod_pagefixup(struct sip_msg *m, char *unused1, char
> *unused2);
>
> static int pagemod_voicemail_transfer(struct sip_msg *m, char
> *unused1, char *unused2);
>
> static int replace_to_uri(struct sip_msg *msg, str *uri);
>
> static int check_passt(struct sip_msg *m, char *unused1, char *unused2);
>
>
> /* Exported module paramaters */
>
> static char *gateway = '\0';
>
> static char *umgw = '\0';
>
> static char *dbhost = '\0';
>
> static char *dbuname = '\0';
>
> static char *dbpass = '\0';
>
> static char *dbname = '\0';
>
> static unsigned short dbport = 0;
>
> static char *vdbhost = '\0';
>
> static char *vdbuname = '\0';
>
> static char *vdbpass = '\0';
>
> static char *vdbname = '\0';
>
> static unsigned short vdbport = 0;
>
>
> /* Make SER happy */
>
> MODULE_VERSION
>
>
> /* SER exports */
>
> static cmd_export_t cmds[]=
>
> {
>
> {"pagefixup", pagemod_pagefixup, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE |
> ONREPLY_ROUTE | BRANCH_ROUTE },
>
> {"voicemail_transfer", pagemod_voicemail_transfer, 0, 0, REQUEST_ROUTE
> | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
>
> {"check_passt", check_passt, 0, 0, REQUEST_ROUTE | BRANCH_ROUTE},
>
> {0, 0, 0, 0, 0}
>
> };
>
>  
>
> /*
>
>  * Script parameters
>
>  */
>
> static param_export_t mod_params[]=
>
> {
>
> {"gateway", STR_PARAM, &gateway},
>
> {"umgw", STR_PARAM, &umgw},
>
> {"dbhost", STR_PARAM, &dbhost},
>
> {"dbuname", STR_PARAM, &dbuname},
>
> {"dbpass", STR_PARAM, &dbpass},
>
> {"dbname", STR_PARAM, &dbname},
>
> {"dbport", INT_PARAM, &dbport},
>
> {"vdbhost", STR_PARAM, &dbhost},
>
> {"vdbuname", STR_PARAM, &dbuname},
>
> {"vdbpass", STR_PARAM, &dbpass},
>
> {"vdbname", STR_PARAM, &dbname},
>
> {"vdbport", INT_PARAM, &dbport},
>
> {0, 0, 0}
>
> };
>
>
> /*
>
>  * fifo commands
>
>  */
>
> static mi_export_t mi_cmds[] =
>
> {
>
> {0, 0, 0, 0, 0}
>
> };
>
>
> /*
>
>  * Export the statistics we have
>
>  */
>
> static stat_export_t mod_stats[] =
>
> {
>
> {0, 0, 0}
>
> };
>
>
> struct module_exports exports =
>
> {
>
> "page", /* module's name */
>
> DEFAULT_DLFLAGS, /* dlopen() fkags */
>
> cmds, /* exported functions */
>
> mod_params, /* param exports */
>
> mod_stats, /* exported statistics */
>
> mi_cmds, /* exported MI functions */
>
> 0, /* exported pseudo variables */
>
> mod_init, /* module initialization function */
>
> 0, /* reply processing function FIXME Not sure when this is used */
>
> mod_destroy, /* Destroy function */
>
> child_init /* per-child init function */
>
> };
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Devel mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>  


_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: I'm doing something to cause opensips to crash

Daniel Corbe
Forgot to CC devel on this.

On Fri, Nov 14, 2008 at 10:21 AM, Daniel Corbe <[hidden email]> wrote:
Hi,

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.  


-Daniel

On Fri, Nov 14, 2008 at 1:09 AM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Daniel,

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 ?

Regards,
Bogdan

Daniel Corbe wrote:
Hi,

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.

-Daniel

(gdb) bt full
#0  0x20ec8353 in ?? ()
No symbol table info available.
#1  0x0809de2d in start_module_procs () at sr_module.c:560
       m = (struct sr_module *) 0x8179ad0
       n = 0
       l = 135742720
       x = 0
       __FUNCTION__ = "start_module_procs"
#2  0x080633b9 in main_loop () at main.c:675
       i = 516746184
       pid = 134863859
       si = (struct socket_info *) 0x28
       chd_rank = 0
       __FUNCTION__ = "main_loop"
#3  0x080655bd in main (argc=1, argv=0xbfbfec88) at main.c:1319
       cfg_log_stderr = 0
       cfg_stream = (FILE *) 0x28260e20
       c = -1
       r = 0
       tmp = 0xbfbfed04 "\004"
       tmp_len = 1
       port = 0
       proto = 0
       options = 0x80fc9ac "f:cCm:b:l:n:N:rRvdDETSVhw:t:u:g:P:G:W:"
       ret = -1
       seed = 2478508788
       rfd = 4
---Type <return> to continue, or q <return> to quit---
       __FUNCTION__ = "main"


page.h:38: warning: initialization from incompatible pointer type
page.h:38: warning: initialization makes pointer from integer without a cast
page.h:39: warning: initialization from incompatible pointer type
page.h:39: warning: initialization makes pointer from integer without a cast
page.h:40: warning: initialization from incompatible pointer type
page.h:40: warning: initialization makes pointer from integer without a cast
page.h:89: warning: initialization from incompatible pointer type
page.h:91: warning: initialization from incompatible pointer type
page.h:93: warning: initialization from incompatible pointer type


/* Function prototypes */
static int mod_init(void);

static void mod_destroy(void);

static int child_init(int);

static int pagemod_pagefixup(struct sip_msg *m, char *unused1, char *unused2);

static int pagemod_voicemail_transfer(struct sip_msg *m, char *unused1, char *unused2);

static int replace_to_uri(struct sip_msg *msg, str *uri);

static int check_passt(struct sip_msg *m, char *unused1, char *unused2);


/* Exported module paramaters */

static char *gateway = '\0';

static char *umgw = '\0';

static char *dbhost = '\0';

static char *dbuname = '\0';

static char *dbpass = '\0';

static char *dbname = '\0';

static unsigned short dbport = 0;

static char *vdbhost = '\0';

static char *vdbuname = '\0';

static char *vdbpass = '\0';

static char *vdbname = '\0';

static unsigned short vdbport = 0;


/* Make SER happy */

MODULE_VERSION


/* SER exports */

static cmd_export_t cmds[]=

{

{"pagefixup", pagemod_pagefixup, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },

{"voicemail_transfer", pagemod_voicemail_transfer, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },

{"check_passt", check_passt, 0, 0, REQUEST_ROUTE | BRANCH_ROUTE},

{0, 0, 0, 0, 0}

};

 
/*

 * Script parameters

 */

static param_export_t mod_params[]=

{

{"gateway", STR_PARAM, &gateway},

{"umgw", STR_PARAM, &umgw},

{"dbhost", STR_PARAM, &dbhost},

{"dbuname", STR_PARAM, &dbuname},

{"dbpass", STR_PARAM, &dbpass},

{"dbname", STR_PARAM, &dbname},

{"dbport", INT_PARAM, &dbport},

{"vdbhost", STR_PARAM, &dbhost},

{"vdbuname", STR_PARAM, &dbuname},

{"vdbpass", STR_PARAM, &dbpass},

{"vdbname", STR_PARAM, &dbname},

{"vdbport", INT_PARAM, &dbport},

{0, 0, 0}

};


/*

 * fifo commands

 */

static mi_export_t mi_cmds[] =

{

{0, 0, 0, 0, 0}

};


/*

 * Export the statistics we have

 */

static stat_export_t mod_stats[] =
{

{0, 0, 0}

};


struct module_exports exports =
{

"page", /* module's name */

DEFAULT_DLFLAGS, /* dlopen() fkags */

cmds, /* exported functions */

mod_params, /* param exports */

mod_stats, /* exported statistics */

mi_cmds, /* exported MI functions */

0, /* exported pseudo variables */

mod_init, /* module initialization function */

0, /* reply processing function FIXME Not sure when this is used */

mod_destroy, /* Destroy function */

child_init /* per-child init function */

};


------------------------------------------------------------------------

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
 




_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: I'm doing something to cause opensips to crash

Kobi Eshun
Hi, Daniel.

I believe the problem is that you're missing a (new) element in the exports structure -- there should be an 'extra processes' entry between 'exported pseudo variables' and 'module initialization function.'

This same issue confounded me for a while also. Cheers,
--
kobi


On Nov 14, 2008, at 10:22 AM, Daniel Corbe wrote:

Forgot to CC devel on this.

On Fri, Nov 14, 2008 at 10:21 AM, Daniel Corbe <[hidden email]> wrote:
Hi,

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.  


-Daniel

On Fri, Nov 14, 2008 at 1:09 AM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Daniel,

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 ?

Regards,
Bogdan

Daniel Corbe wrote:
Hi,

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.

-Daniel

(gdb) bt full
#0  0x20ec8353 in ?? ()
No symbol table info available.
#1  0x0809de2d in start_module_procs () at sr_module.c:560
       m = (struct sr_module *) 0x8179ad0
       n = 0
       l = 135742720
       x = 0
       __FUNCTION__ = "start_module_procs"
#2  0x080633b9 in main_loop () at main.c:675
       i = 516746184
       pid = 134863859
       si = (struct socket_info *) 0x28
       chd_rank = 0
       __FUNCTION__ = "main_loop"
#3  0x080655bd in main (argc=1, argv=0xbfbfec88) at main.c:1319
       cfg_log_stderr = 0
       cfg_stream = (FILE *) 0x28260e20
       c = -1
       r = 0
       tmp = 0xbfbfed04 "\004"
       tmp_len = 1
       port = 0
       proto = 0
       options = 0x80fc9ac "f:cCm:b:l:n:N:rRvdDETSVhw:t:u:g:P:G:W:"
       ret = -1
       seed = 2478508788
       rfd = 4
---Type <return> to continue, or q <return> to quit---
       __FUNCTION__ = "main"


page.h:38: warning: initialization from incompatible pointer type
page.h:38: warning: initialization makes pointer from integer without a cast
page.h:39: warning: initialization from incompatible pointer type
page.h:39: warning: initialization makes pointer from integer without a cast
page.h:40: warning: initialization from incompatible pointer type
page.h:40: warning: initialization makes pointer from integer without a cast
page.h:89: warning: initialization from incompatible pointer type
page.h:91: warning: initialization from incompatible pointer type
page.h:93: warning: initialization from incompatible pointer type


/* Function prototypes */
static int mod_init(void);

static void mod_destroy(void);

static int child_init(int);

static int pagemod_pagefixup(struct sip_msg *m, char *unused1, char *unused2);

static int pagemod_voicemail_transfer(struct sip_msg *m, char *unused1, char *unused2);

static int replace_to_uri(struct sip_msg *msg, str *uri);

static int check_passt(struct sip_msg *m, char *unused1, char *unused2);


/* Exported module paramaters */

static char *gateway = '\0';

static char *umgw = '\0';

static char *dbhost = '\0';

static char *dbuname = '\0';

static char *dbpass = '\0';

static char *dbname = '\0';

static unsigned short dbport = 0;

static char *vdbhost = '\0';

static char *vdbuname = '\0';

static char *vdbpass = '\0';

static char *vdbname = '\0';

static unsigned short vdbport = 0;


/* Make SER happy */

MODULE_VERSION


/* SER exports */

static cmd_export_t cmds[]=

{

{"pagefixup", pagemod_pagefixup, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },

{"voicemail_transfer", pagemod_voicemail_transfer, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },

{"check_passt", check_passt, 0, 0, REQUEST_ROUTE | BRANCH_ROUTE},

{0, 0, 0, 0, 0}

};

 
/*

 * Script parameters

 */

static param_export_t mod_params[]=

{

{"gateway", STR_PARAM, &gateway},

{"umgw", STR_PARAM, &umgw},

{"dbhost", STR_PARAM, &dbhost},

{"dbuname", STR_PARAM, &dbuname},

{"dbpass", STR_PARAM, &dbpass},

{"dbname", STR_PARAM, &dbname},

{"dbport", INT_PARAM, &dbport},

{"vdbhost", STR_PARAM, &dbhost},

{"vdbuname", STR_PARAM, &dbuname},

{"vdbpass", STR_PARAM, &dbpass},

{"vdbname", STR_PARAM, &dbname},

{"vdbport", INT_PARAM, &dbport},

{0, 0, 0}

};


/*

 * fifo commands

 */

static mi_export_t mi_cmds[] =

{

{0, 0, 0, 0, 0}

};


/*

 * Export the statistics we have

 */

static stat_export_t mod_stats[] =
{

{0, 0, 0}

};


struct module_exports exports =
{

"page", /* module's name */

DEFAULT_DLFLAGS, /* dlopen() fkags */

cmds, /* exported functions */

mod_params, /* param exports */

mod_stats, /* exported statistics */

mi_cmds, /* exported MI functions */

0, /* exported pseudo variables */

mod_init, /* module initialization function */

0, /* reply processing function FIXME Not sure when this is used */

mod_destroy, /* Destroy function */

child_init /* per-child init function */

};


------------------------------------------------------------------------

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
 



_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: I'm doing something to cause opensips to crash

Daniel Corbe
'sho 'nuff, that was the problem.

Thanks man!  I guess I should pay more attention to the header files :)

-Daniel

On Fri, Nov 14, 2008 at 11:21 AM, Kobi Eshun <[hidden email]> wrote:
Hi, Daniel.

I believe the problem is that you're missing a (new) element in the exports structure -- there should be an 'extra processes' entry between 'exported pseudo variables' and 'module initialization function.'

This same issue confounded me for a while also. Cheers,
--
kobi


On Nov 14, 2008, at 10:22 AM, Daniel Corbe wrote:

Forgot to CC devel on this.

On Fri, Nov 14, 2008 at 10:21 AM, Daniel Corbe <[hidden email]> wrote:
Hi,

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.  


-Daniel

On Fri, Nov 14, 2008 at 1:09 AM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Daniel,

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 ?

Regards,
Bogdan

Daniel Corbe wrote:
Hi,

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.

-Daniel

(gdb) bt full
#0  0x20ec8353 in ?? ()
No symbol table info available.
#1  0x0809de2d in start_module_procs () at sr_module.c:560
       m = (struct sr_module *) 0x8179ad0
       n = 0
       l = 135742720
       x = 0
       __FUNCTION__ = "start_module_procs"
#2  0x080633b9 in main_loop () at main.c:675
       i = 516746184
       pid = 134863859
       si = (struct socket_info *) 0x28
       chd_rank = 0
       __FUNCTION__ = "main_loop"
#3  0x080655bd in main (argc=1, argv=0xbfbfec88) at main.c:1319
       cfg_log_stderr = 0
       cfg_stream = (FILE *) 0x28260e20
       c = -1
       r = 0
       tmp = 0xbfbfed04 "\004"
       tmp_len = 1
       port = 0
       proto = 0
       options = 0x80fc9ac "f:cCm:b:l:n:N:rRvdDETSVhw:t:u:g:P:G:W:"
       ret = -1
       seed = 2478508788
       rfd = 4
---Type <return> to continue, or q <return> to quit---
       __FUNCTION__ = "main"


page.h:38: warning: initialization from incompatible pointer type
page.h:38: warning: initialization makes pointer from integer without a cast
page.h:39: warning: initialization from incompatible pointer type
page.h:39: warning: initialization makes pointer from integer without a cast
page.h:40: warning: initialization from incompatible pointer type
page.h:40: warning: initialization makes pointer from integer without a cast
page.h:89: warning: initialization from incompatible pointer type
page.h:91: warning: initialization from incompatible pointer type
page.h:93: warning: initialization from incompatible pointer type


/* Function prototypes */
static int mod_init(void);

static void mod_destroy(void);

static int child_init(int);

static int pagemod_pagefixup(struct sip_msg *m, char *unused1, char *unused2);

static int pagemod_voicemail_transfer(struct sip_msg *m, char *unused1, char *unused2);

static int replace_to_uri(struct sip_msg *msg, str *uri);

static int check_passt(struct sip_msg *m, char *unused1, char *unused2);


/* Exported module paramaters */

static char *gateway = '\0';

static char *umgw = '\0';

static char *dbhost = '\0';

static char *dbuname = '\0';

static char *dbpass = '\0';

static char *dbname = '\0';

static unsigned short dbport = 0;

static char *vdbhost = '\0';

static char *vdbuname = '\0';

static char *vdbpass = '\0';

static char *vdbname = '\0';

static unsigned short vdbport = 0;


/* Make SER happy */

MODULE_VERSION


/* SER exports */

static cmd_export_t cmds[]=

{

{"pagefixup", pagemod_pagefixup, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },

{"voicemail_transfer", pagemod_voicemail_transfer, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },

{"check_passt", check_passt, 0, 0, REQUEST_ROUTE | BRANCH_ROUTE},

{0, 0, 0, 0, 0}

};

 
/*

 * Script parameters

 */

static param_export_t mod_params[]=

{

{"gateway", STR_PARAM, &gateway},

{"umgw", STR_PARAM, &umgw},

{"dbhost", STR_PARAM, &dbhost},

{"dbuname", STR_PARAM, &dbuname},

{"dbpass", STR_PARAM, &dbpass},

{"dbname", STR_PARAM, &dbname},

{"dbport", INT_PARAM, &dbport},

{"vdbhost", STR_PARAM, &dbhost},

{"vdbuname", STR_PARAM, &dbuname},

{"vdbpass", STR_PARAM, &dbpass},

{"vdbname", STR_PARAM, &dbname},

{"vdbport", INT_PARAM, &dbport},

{0, 0, 0}

};


/*

 * fifo commands

 */

static mi_export_t mi_cmds[] =

{

{0, 0, 0, 0, 0}

};


/*

 * Export the statistics we have

 */

static stat_export_t mod_stats[] =
{

{0, 0, 0}

};


struct module_exports exports =
{

"page", /* module's name */

DEFAULT_DLFLAGS, /* dlopen() fkags */

cmds, /* exported functions */

mod_params, /* param exports */

mod_stats, /* exported statistics */

mi_cmds, /* exported MI functions */

0, /* exported pseudo variables */

mod_init, /* module initialization function */

0, /* reply processing function FIXME Not sure when this is used */

mod_destroy, /* Destroy function */

child_init /* per-child init function */

};


------------------------------------------------------------------------

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
 



_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel



_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel