diff options
Diffstat (limited to 'lib/agentx.c')
| -rw-r--r-- | lib/agentx.c | 4 |
1 files changed, 2 insertions, 2 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); } } |
