From 102e494708a4db76df5ec80540e0efb728a712e7 Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Thu, 10 Jun 2021 21:08:58 +0200 Subject: [PATCH] TT#121250 /api/peeringrules fix lcr.reload * xmlrpc lcr.reload request is now sent after the transaction is committed, otherwise the reload operation is performed without the newly added changes in the peering rules Change-Id: I728605a8d277b00d02a3f864c84f172306f7b090 --- lib/NGCP/Panel/Controller/API/PeeringRules.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Controller/API/PeeringRules.pm b/lib/NGCP/Panel/Controller/API/PeeringRules.pm index b5016f4093..4abacf6600 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringRules.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringRules.pm @@ -154,7 +154,6 @@ sub POST :Allow { try { $item = $c->model('DB')->resultset('voip_peer_rules')->create($resource); - NGCP::Panel::Utils::Peering::_sip_lcr_reload(c => $c); } catch($e) { $c->log->error("failed to create peering rule: $e"); # TODO: user, message, trace, ... $self->error($c, HTTP_INTERNAL_SERVER_ERROR, "Failed to create peering rule."); @@ -162,6 +161,7 @@ sub POST :Allow { } $guard->commit; + NGCP::Panel::Utils::Peering::_sip_lcr_reload(c => $c); $c->response->status(HTTP_CREATED); $c->response->header(Location => sprintf('/%s%d', $c->request->path, $item->id));