At least two places in OpenSIPS where "use UNIVERSAL" is used:
At least two places in Kamailio where "use UNIVERSAL" is used:
modules/app_perl/lib/perl/Kamailio/LDAPUtils/LDAPConnection.pm
55:use UNIVERSAL qw( isa );
if( isa($conf ,"Kamailio::LDAPUtils::LDAPConnection") ) {
modules/app_perl/lib/perl/Kamailio/VDB.pm
48:use UNIVERSAL qw ( can );
90: if (can($pkg, $3)) {
92: } elsif (can($v, "init")) {
95: } elsif (can($v, "new")) {
This should be fixed as according to this document it will throw a fatal error starting with Perl 5.22:
http://search.cpan.org/~shay/perl-5.21.11/pod/perl5213delta.pod#use%C2%A0UN…
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/516
Module: kamailio
Branch: master
Commit: c1cb68f6f8d01ebaea52ae3fd9ceb8c38885ad84
URL: https://github.com/kamailio/kamailio/commit/c1cb68f6f8d01ebaea52ae3fd9ceb8c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-04-15T09:00:53+02:00
core: execute onsend_route callback via kemi
---
Modified: onsend.h
---
Diff: https://github.com/kamailio/kamailio/commit/c1cb68f6f8d01ebaea52ae3fd9ceb8c…
Patch: https://github.com/kamailio/kamailio/commit/c1cb68f6f8d01ebaea52ae3fd9ceb8c…
---
diff --git a/onsend.h b/onsend.h
index 2ed68be..2f15663 100644
--- a/onsend.h
+++ b/onsend.h
@@ -13,8 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*!
@@ -34,6 +34,7 @@
#include "route.h"
#include "script_cb.h"
#include "sr_compat.h"
+#include "kemi.h"
struct onsend_info{
union sockaddr_union* to; /* dest info */
@@ -58,10 +59,12 @@ static inline int run_onsend(struct sip_msg* orig_msg, struct dest_info* dst,
struct onsend_info onsnd_info = {0};
int ret;
struct run_act_ctx ra_ctx;
+ struct run_act_ctx *bctx;
int backup_route_type;
snd_flags_t fwd_snd_flags_bak;
snd_flags_t rpl_snd_flags_bak;
-
+ sr_kemi_eng_t *keng = NULL;
+
ret=1;
if (onsend_rt.rlist[DEFAULT_RT]){
onsnd_info.to=&dst->to;
@@ -78,7 +81,17 @@ static inline int run_onsend(struct sip_msg* orig_msg, struct dest_info* dst,
rpl_snd_flags_bak=orig_msg->rpl_send_flags;
orig_msg->fwd_send_flags=dst->send_flags; /* intial value */
init_run_actions_ctx(&ra_ctx);
- ret=run_actions(&ra_ctx, onsend_rt.rlist[DEFAULT_RT], orig_msg);
+
+ keng = sr_kemi_eng_get();
+ if(unlikely(keng!=NULL)) {
+ bctx = sr_kemi_act_ctx_get();
+ sr_kemi_act_ctx_set(&ra_ctx);
+ ret=keng->froute(orig_msg, ONSEND_ROUTE, NULL);
+ sr_kemi_act_ctx_set(bctx);
+ } else {
+ ret=run_actions(&ra_ctx, onsend_rt.rlist[DEFAULT_RT], orig_msg);
+ }
+
/* update dst send_flags */
dst->send_flags=orig_msg->fwd_send_flags;
/* restore orig_msg flags */
This PR comes as a result to enabling MALLOC_STATS on 4.1 branch and noticing kamailio slowdown. On 4.1 the slowdown was happening because each time a memory function was called, iteration through all fragments happened upon `pkg_info`.
On master this is not happening anymore, because `qm->ffrags` variable counts the fragments "on the fly", while memory functions are called. Still, is it necessarily to call pkg_proc_update_stats() callback every time?!
Feel free to close this if not needed.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/567
-- Commit Summary --
* kex: Call pkg_proc_update_stats only when needed
-- File Changes --
M events.c (13)
M events.h (1)
M mem/f_malloc.c (9)
M mem/q_malloc.c (18)
M modules/kex/pkg_stats.c (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/567.patchhttps://github.com/kamailio/kamailio/pull/567.diff
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/567