From 79433a61f809f88696e46cbc819265337cd19579 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 7 May 2008 15:28:07 +0000 Subject: [PATCH] fix git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8293 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/languages/mod_perl/mod_perl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mod/languages/mod_perl/mod_perl.c b/src/mod/languages/mod_perl/mod_perl.c index 62769d1226..fe09cab64e 100644 --- a/src/mod/languages/mod_perl/mod_perl.c +++ b/src/mod/languages/mod_perl/mod_perl.c @@ -423,10 +423,14 @@ static switch_xml_t perl_fetch(const char *section, ); Perl_safe_eval(my_perl, code); - perl_run(my_perl); - str = SvPV(get_sv("XML_STRING", FALSE), n_a); + if (params) { + mod_perl_conjure_event(my_perl, params, "params"); + } - if (str) { + perl_run(my_perl); + str = SvPV(get_sv("XML_STRING", TRUE), n_a); + + if (!switch_strlen_zero(str)) { if (switch_strlen_zero(str)) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No Result\n"); } else if (!(xml = switch_xml_parse_str(str, strlen(str)))) {