Hello Marat,

Thanks for letting us know, good that you found it.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: Marat Gareev <[email protected]>
Sent: Monday, July 13, 2020 2:29 PM
To: Henning Westerholt <[email protected]>
Cc: Kamailio (SER) - Users Mailing List <[email protected]>; Kamailio 
(SER) - Development Mailing List <[email protected]>
Subject: Re: [SR-Users] xHTTP_PROM with older Kamailio

I found that the export module interface was changed 
(https://www.kamailio.org/w/2018/09/new-module-exports-interface/).

I downgraded to old-style version this structure
struct module_exports exports = {
    "xhttp_prom",
    DEFAULT_DLFLAGS, /* dlopen flags */
    cmds,
    params,
    0,              /* exported RPC methods */
    0,          /* exported pseudo-variables */
    0,              /* response function */
    mod_init,       /* module initialization function */
    0,      /* per child init function */
    mod_destroy     /* destroy function */
};
to
struct module_exports exports = {
    "xhttp_prom",
    DEFAULT_DLFLAGS, /* dlopen flags */
    cmds,
    params,
    0,
    0,              /* exported MI functions */
    0,              /* exported pseudo-variables */
    0,              /* extra processes */
    mod_init,       /* module initialization function */
    0,      /* per child init function */
    mod_destroy,     /* destroy function */
    NULL      /* per child init function */
};
The problem is that mod_init was zero, so it was not called.
And now mod_init is called and I can use this module.

Many thanks 😊
_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to