summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormhemmatp <mhemmatp@cisco.com>2019-12-19 16:07:30 +0100
committermhemmatp <mhemmatp@cisco.com>2019-12-19 16:08:41 +0100
commit568cf5b8cbb32036feb61076d1f79d1497073b4b (patch)
tree31b4208bbe43a9bb5cd27bbc0c0ec6828c5430fd
parentee4e2645e36a34ee736d320832349bcfa54ab306 (diff)
[HICN-464] swapping the initial buffer
Signed-off-by: mhemmatp <mhemmatp@cisco.com> Change-Id: Iff7880bfc02c1ecd82b090d098c4b11268dc899c
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c b/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c
index d73e6145a..6e95a3013 100644
--- a/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c
@@ -1104,15 +1104,6 @@ int hicn_subscribe_events(sr_session_ctx_t *session,
int rc = SR_ERR_OK;
SRP_LOG_DBGMSG("Subscriging hicn.");
- // Create state thread observation
- pthread_t state_tid;
- rc = pthread_create((pthread_t *)&state_tid, NULL, state_thread, NULL);
- if (rc != 0) {
- SRP_LOG_DBGMSG("Error making hicn state thread");
- return SR_ERR_OPERATION_FAILED;
- }
- SRP_LOG_DBGMSG("State thread created successfully.");
-
//Initializing the locks
for (int i=0; i<NLOCKS; i++)
ticket_init(i,LOCK_INIT);
@@ -1144,6 +1135,16 @@ int hicn_subscribe_events(sr_session_ctx_t *session,
SRP_LOG_DBGMSG("pools created successfully.");
+ // Create state thread observation
+ pthread_t state_tid;
+ rc = pthread_create((pthread_t *)&state_tid, NULL, state_thread, NULL);
+ if (rc != 0) {
+ SRP_LOG_DBGMSG("Error making hicn state thread");
+ return SR_ERR_OPERATION_FAILED;
+ }
+ SRP_LOG_DBGMSG("State thread created successfully.");
+
+
/*
// subscripe for edit-config
rc = sr_module_change_subscribe(