diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-12-19 15:24:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-12-19 15:24:47 +0000 |
commit | 724ca3128c772c76df20571211a77e7566285ff6 (patch) | |
tree | 44e6de4c6215c2f1f80c54f4ed3819961e8653b9 | |
parent | 8112f87332232a707b46897fad3286db32abd077 (diff) | |
parent | 568cf5b8cbb32036feb61076d1f79d1497073b4b (diff) |
Merge "[HICN-464] swapping the initial buffer"
-rw-r--r-- | ctrl/sysrepo-plugins/hicn-plugin/plugin/model/hicn_model.c | 19 |
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( |