Module: sip-router Branch: master Commit: 4cc713182c4f5b53a00a8d2d6d3a21afca589b77 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4cc71318...
Author: Konstantin Mosesov ez@voipgroup.org.ua Committer: Konstantin Mosesov ez@voipgroup.org.ua Date: Sun Jan 20 17:38:06 2013 +0200
app_python: - fixed runtime warning: exports dlflags interface is deprecated and it will not be supported in newer versions; consider using mod_register() instead - python routines can be called in any routes.
---
modules/app_python/python_mod.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/app_python/python_mod.c b/modules/app_python/python_mod.c index bfae63c..c5c60fc 100644 --- a/modules/app_python/python_mod.c +++ b/modules/app_python/python_mod.c @@ -66,15 +66,15 @@ static param_export_t params[]={ * Exported functions */ static cmd_export_t cmds[] = { - { "python_exec", (cmd_function)python_exec1, 1, NULL, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE }, - { "python_exec", (cmd_function)python_exec2, 2, NULL, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE }, + { "python_exec", (cmd_function)python_exec1, 1, NULL, 0, ANY_ROUTE }, + { "python_exec", (cmd_function)python_exec2, 2, NULL, 0, ANY_ROUTE }, { 0, 0, 0, 0, 0, 0 } };
/** module exports */ struct module_exports exports = { "app_python", /* module name */ - RTLD_NOW | RTLD_GLOBAL, /* dlopen flags */ + DEFAULT_DLFLAGS, /* dlopen flags */ cmds, /* exported functions */ params, /* exported parameters */ 0, /* exported statistics */
Try to format the log message based on git recommendations, with first line descriptive as subject for email, empty line and then the rest of the message: - http://www.kamailio.org/wiki/devel/git-commit-guidelines#commit_message
The email notifications and commit logs will be better formatted.
Then, have you tested with the new module loading flags? As far as I know, RTLD_NOW | RTLD_GLOBAL are required for embedded interpreters. The warning you tried to fix is from the core at startup, suggesting an alternative to pass loading shared object file flags, but the flags should be the old ones.
Cheers, Daniel
On 1/20/13 4:37 PM, Konstantin Mosesov wrote:
Module: sip-router Branch: master Commit: 4cc713182c4f5b53a00a8d2d6d3a21afca589b77 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4cc71318...
Author: Konstantin Mosesov ez@voipgroup.org.ua Committer: Konstantin Mosesov ez@voipgroup.org.ua Date: Sun Jan 20 17:38:06 2013 +0200
app_python: - fixed runtime warning: exports dlflags interface is deprecated and it will not be supported in newer versions; consider using mod_register() instead - python routines can be called in any routes.
modules/app_python/python_mod.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/app_python/python_mod.c b/modules/app_python/python_mod.c index bfae63c..c5c60fc 100644 --- a/modules/app_python/python_mod.c +++ b/modules/app_python/python_mod.c @@ -66,15 +66,15 @@ static param_export_t params[]={
- Exported functions
*/ static cmd_export_t cmds[] = {
- { "python_exec", (cmd_function)python_exec1, 1, NULL, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
- { "python_exec", (cmd_function)python_exec2, 2, NULL, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
{ "python_exec", (cmd_function)python_exec1, 1, NULL, 0, ANY_ROUTE },
{ "python_exec", (cmd_function)python_exec2, 2, NULL, 0, ANY_ROUTE }, { 0, 0, 0, 0, 0, 0 } };
/** module exports */ struct module_exports exports = { "app_python", /* module name */
- RTLD_NOW | RTLD_GLOBAL, /* dlopen flags */
- DEFAULT_DLFLAGS, /* dlopen flags */ cmds, /* exported functions */ params, /* exported parameters */ 0, /* exported statistics */
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
2013/1/20 Daniel-Constantin Mierla miconda@gmail.com
Try to format the log message based on git recommendations, with first line descriptive as subject for email, empty line and then the rest of the message:
commit_messagehttp://www.kamailio.org/wiki/devel/git-commit-guidelines#commit_message
The email notifications and commit logs will be better formatted.
Ok, will follow these recommendations/
Then, have you tested with the new module loading flags? As far as I know, RTLD_NOW | RTLD_GLOBAL are required for embedded interpreters. The warning you tried to fix is from the core at startup, suggesting an alternative to pass loading shared object file flags, but the flags should be the old ones.
Yes, I tested this. All is working fine. Also, RTLD_NOW, meaning "resolve all undefined symbols before dlopen() returns and fail if this cannot be done". RTLD_GLOBAL may be optionally or'ed with either value in flag, meaning that the external symbols defined in the library will be made available to subsequently loaded libraries. If the first argument to `dlsym' or `dlvsym' is set to RTLD_DEFAULT the run-time address of the symbol called NAME in the global scope is returned. All the symbols of the loaded object and its dependencies are made visible as if the object were linked directly into the program.
What is wrong here ?
Ok, will revert to RTLD_NOW | RTLD_GLOBAL.
Cheers, Daniel
On 1/20/13 4:37 PM, Konstantin Mosesov wrote:
Module: sip-router Branch: master Commit: 4cc713182c4f5b53a00a8d2d6d3a21**afca589b77 URL: http://git.sip-router.org/cgi-**bin/gitweb.cgi/sip-router/?a=** commit;h=**4cc713182c4f5b53a00a8d2d6d3a21**afca589b77http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4cc713182c4f5b53a00a8d2d6d3a21afca589b77
Author: Konstantin Mosesov ez@voipgroup.org.ua Committer: Konstantin Mosesov ez@voipgroup.org.ua Date: Sun Jan 20 17:38:06 2013 +0200
app_python: - fixed runtime warning: exports dlflags interface is deprecated and it will not be supported in newer versions; consider using mod_register() instead - python routines can be called in any routes.
modules/app_python/python_mod.**c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/app_python/python_**mod.c b/modules/app_python/python_**mod.c index bfae63c..c5c60fc 100644 --- a/modules/app_python/python_**mod.c +++ b/modules/app_python/python_**mod.c @@ -66,15 +66,15 @@ static param_export_t params[]={
- Exported functions
*/ static cmd_export_t cmds[] = {
- { "python_exec", (cmd_function)python_exec1, 1, NULL, 0,
REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
- { "python_exec", (cmd_function)python_exec2, 2, NULL, 0,
REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
- { "python_exec", (cmd_function)python_exec1, 1, NULL, 0, ANY_ROUTE
},
- { "python_exec", (cmd_function)python_exec2, 2, NULL, 0, ANY_ROUTE
}, { 0, 0, 0, 0, 0, 0 } }; /** module exports */ struct module_exports exports = { "app_python", /* module name */
- RTLD_NOW | RTLD_GLOBAL, /* dlopen flags */
- DEFAULT_DLFLAGS, /* dlopen flags */ cmds, /* exported functions */ params, /* exported parameters */ 0, /* exported statistics */
______________________________**_________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**devhttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/**micondahttp://www.linkedin.com/in/miconda Kamailio World Conference, April 16-17, 2013, Berlin
______________________________**_________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**devhttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev