X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Fsflow_sampler.c;h=c2b4556cf6ee505ce242781abab64a05be6420a6;hb=7103dec49eb569c3196239da6c178a29c3003e2b;hp=759b5a22c7e95f53467ccd729125c4e6ca5f8d38;hpb=a4af00400a835eb87569ba40e21874c05e872c0f;p=openvswitch diff --git a/lib/sflow_sampler.c b/lib/sflow_sampler.c index 759b5a22..c2b4556c 100644 --- a/lib/sflow_sampler.c +++ b/lib/sflow_sampler.c @@ -16,14 +16,17 @@ void sfl_sampler_init(SFLSampler *sampler, SFLAgent *agent, SFLDataSource_instan SFLDataSource_instance dsi = *pdsi; /* preserve the *nxt pointer too, in case we are resetting this poller and it is - already part of the agent's linked list (thanks to Matt Woodly for pointing this out) */ + already part of the agent's linked list (thanks to Matt Woodly for pointing this out, + and to Andy Kitchingman for pointing out that it applies to the hash_nxt ptr too) */ SFLSampler *nxtPtr = sampler->nxt; + SFLSampler *hashPtr = sampler->hash_nxt; /* clear everything */ memset(sampler, 0, sizeof(*sampler)); - /* restore the linked list ptr */ + /* restore the linked list and hash-table ptr */ sampler->nxt = nxtPtr; + sampler->hash_nxt = hashPtr; /* now copy in the parameters */ sampler->agent = agent;