TT#8657 fix xmlrpc trustedReload

the correct method of the xmlrpc call is permissions.trustedReload

Change-Id: I78bd582a9d6d30437c414ffd8c540de56684242e
changes/85/10885/1
Gerhard Jungwirth 9 years ago
parent 05eb8f6ec1
commit 36732d3918

@ -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.");

@ -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 },

@ -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;
}

@ -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, <<EOF );
<?xml version="1.0" ?>
<methodCall>
<methodName>permissions.addressReload</methodName>
<methodName>permissions.trustedReload</methodName>
</methodCall>
EOF
}

Loading…
Cancel
Save