From 36732d3918ad1f449fa721ea4d2146020e234ffc Mon Sep 17 00:00:00 2001 From: Gerhard Jungwirth Date: Thu, 26 Jan 2017 11:11:33 +0100 Subject: [PATCH] TT#8657 fix xmlrpc trustedReload the correct method of the xmlrpc call is permissions.trustedReload Change-Id: I78bd582a9d6d30437c414ffd8c540de56684242e --- lib/NGCP/Panel/Controller/API/TrustedSources.pm | 2 +- lib/NGCP/Panel/Controller/Subscriber.pm | 6 +++--- lib/NGCP/Panel/Role/API/TrustedSources.pm | 2 +- lib/NGCP/Panel/Utils/Kamailio.pm | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/NGCP/Panel/Controller/API/TrustedSources.pm b/lib/NGCP/Panel/Controller/API/TrustedSources.pm index 2a6c9162ca..94b5e50713 100644 --- a/lib/NGCP/Panel/Controller/API/TrustedSources.pm +++ b/lib/NGCP/Panel/Controller/API/TrustedSources.pm @@ -187,7 +187,7 @@ sub POST :Allow { my $item; try { $item = $c->model('DB')->resultset('voip_trusted_sources')->create($resource); - NGCP::Panel::Utils::Kamailio::address_reload($c); + NGCP::Panel::Utils::Kamailio::trusted_reload($c); } catch($e) { $c->log->error("failed to create trusted source: $e"); # TODO: user, message, trace, ... $self->error($c, HTTP_INTERNAL_SERVER_ERROR, "Failed to create trusted source."); diff --git a/lib/NGCP/Panel/Controller/Subscriber.pm b/lib/NGCP/Panel/Controller/Subscriber.pm index e9262c7916..d610f65bd7 100644 --- a/lib/NGCP/Panel/Controller/Subscriber.pm +++ b/lib/NGCP/Panel/Controller/Subscriber.pm @@ -3838,7 +3838,7 @@ sub create_trusted :Chained('base') :PathPart('preferences/trusted/create') :Arg protocol => $form->field('protocol')->value, from_pattern => $form->field('from_pattern') ? $form->field('from_pattern')->value : undef, }); - NGCP::Panel::Utils::Kamailio::address_reload($c); + NGCP::Panel::Utils::Kamailio::trusted_reload($c); NGCP::Panel::Utils::Message::info( c => $c, desc => $c->loc('Successfully created trusted source'), @@ -3915,7 +3915,7 @@ sub edit_trusted :Chained('trusted_base') :PathPart('edit') { protocol => $form->field('protocol')->value, from_pattern => $form->field('from_pattern') ? $form->field('from_pattern')->value : undef, }); - NGCP::Panel::Utils::Kamailio::address_reload($c); + NGCP::Panel::Utils::Kamailio::trusted_reload($c); NGCP::Panel::Utils::Message::info( c => $c, desc => $c->loc('Successfully updated trusted source'), @@ -3947,7 +3947,7 @@ sub delete_trusted :Chained('trusted_base') :PathPart('delete') :Args(0) { try { $c->stash->{trusted}->delete; - NGCP::Panel::Utils::Kamailio::address_reload($c); + NGCP::Panel::Utils::Kamailio::trusted_reload($c); NGCP::Panel::Utils::Message::info( c => $c, data => { $c->stash->{trusted}->get_inflated_columns }, diff --git a/lib/NGCP/Panel/Role/API/TrustedSources.pm b/lib/NGCP/Panel/Role/API/TrustedSources.pm index db1a3cf72c..55327a7d5b 100644 --- a/lib/NGCP/Panel/Role/API/TrustedSources.pm +++ b/lib/NGCP/Panel/Role/API/TrustedSources.pm @@ -116,7 +116,7 @@ sub update_item { $resource->{uuid} = $sub->uuid; $item->update($resource); - NGCP::Panel::Utils::Kamailio::address_reload($c); + NGCP::Panel::Utils::Kamailio::trusted_reload($c); return $item; } diff --git a/lib/NGCP/Panel/Utils/Kamailio.pm b/lib/NGCP/Panel/Utils/Kamailio.pm index 4fb07d9b74..25f4577434 100644 --- a/lib/NGCP/Panel/Utils/Kamailio.pm +++ b/lib/NGCP/Panel/Utils/Kamailio.pm @@ -86,14 +86,14 @@ sub flush { EOF } -sub address_reload { +sub trusted_reload { my ($c) = @_; my $dispatcher = NGCP::Panel::Utils::XMLDispatcher->new; my $ret = $dispatcher->dispatch($c, "proxy-ng", 1, 1, < -permissions.addressReload +permissions.trustedReload EOF }