diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/agentx.c | 4 | ||||
| -rw-r--r-- | lib/northbound_grpc.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/agentx.c b/lib/agentx.c index e03e19aad5..4c087219cb 100644 --- a/lib/agentx.c +++ b/lib/agentx.c @@ -146,9 +146,9 @@ static void agentx_events_update(void) else if (FD_ISSET(fd, &fds)) { struct listnode *newln; thr = XCALLOC(MTYPE_TMP, sizeof(struct thread *)); - thread_add_read(agentx_tm, agentx_read, NULL, fd, thr); + newln = listnode_add_before(events, ln, thr); - (*thr)->arg = newln; + thread_add_read(agentx_tm, agentx_read, newln, fd, thr); } } diff --git a/lib/northbound_grpc.cpp b/lib/northbound_grpc.cpp index 9cb999110b..95721ffc77 100644 --- a/lib/northbound_grpc.cpp +++ b/lib/northbound_grpc.cpp @@ -198,7 +198,7 @@ class RpcStateBase static void c_callback(struct thread *thread) { - auto _tag = static_cast<RpcStateBase *>(thread->arg); + auto _tag = static_cast<RpcStateBase *>(THREAD_ARG(thread)); /* * We hold the lock until the callback finishes and has updated * _tag->state, then we signal done and release. |
