Skip to content

Commit

Permalink
dropmon use mutex
Browse files Browse the repository at this point in the history
  • Loading branch information
sflow committed Jul 30, 2020
1 parent 4d24fb7 commit e4aba83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Linux/mod_dropmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,10 @@ That would allow everything to stay on the stack as it does here, which has nice
SFL_DS_SET(search.dsi, 0, ifIndex, 0);
SFLNotifier *notifier = UTHashGet(mdata->notifiers, &search);
if(!notifier) {
notifier = sfl_agent_addNotifier(sp->agent, &search.dsi);
sfl_notifier_set_sFlowEsReceiver(notifier, HSP_SFLOW_RECEIVER_INDEX);
SEMLOCK_DO(sp->sync_agent) {
notifier = sfl_agent_addNotifier(sp->agent, &search.dsi);
sfl_notifier_set_sFlowEsReceiver(notifier, HSP_SFLOW_RECEIVER_INDEX);
}
UTHashAdd(mdata->notifiers, notifier);
}
return notifier;
Expand Down

0 comments on commit e4aba83

Please sign in to comment.