summaryrefslogtreecommitdiff
path: root/lib/northbound_grpc.cpp
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2019-09-18 15:42:06 -0400
committerGitHub <noreply@github.com>2019-09-18 15:42:06 -0400
commit5d9a2c67a4857563d080e085f285a701b65cb120 (patch)
tree561cb1604ebcbe41598be9b6521523c396b9fa3f /lib/northbound_grpc.cpp
parent0a0d4f9e2e8bdf9d378c1c07a60e11f8a1bb7cec (diff)
parent6f4e5eddc0a5ce84fd0546bb8cb21c7530ff0693 (diff)
Merge pull request #5008 from opensourcerouting/nb-improvements
northbound fixes and enhancements
Diffstat (limited to 'lib/northbound_grpc.cpp')
-rw-r--r--lib/northbound_grpc.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/lib/northbound_grpc.cpp b/lib/northbound_grpc.cpp
index a55da23dd1..1d6317b005 100644
--- a/lib/northbound_grpc.cpp
+++ b/lib/northbound_grpc.cpp
@@ -702,15 +702,10 @@ class NorthboundImpl final : public frr::Northbound::Service
{
struct lyd_node *dnode;
- pthread_rwlock_rdlock(&running_config->lock);
- {
- dnode = yang_dnode_get(running_config->dnode,
- path.empty() ? NULL
- : path.c_str());
- if (dnode)
- dnode = yang_dnode_dup(dnode);
- }
- pthread_rwlock_unlock(&running_config->lock);
+ dnode = yang_dnode_get(running_config->dnode,
+ path.empty() ? NULL : path.c_str());
+ if (dnode)
+ dnode = yang_dnode_dup(dnode);
return dnode;
}
@@ -817,11 +812,7 @@ class NorthboundImpl final : public frr::Northbound::Service
struct candidate *candidate = &_candidates[candidate_id];
candidate->id = candidate_id;
- pthread_rwlock_rdlock(&running_config->lock);
- {
- candidate->config = nb_config_dup(running_config);
- }
- pthread_rwlock_unlock(&running_config->lock);
+ candidate->config = nb_config_dup(running_config);
candidate->transaction = NULL;
return candidate;