Changeset e375e0f
- Timestamp:
- 02/28/18 15:11:24 (3 years ago)
- Branches:
- cachetimestamps, develop, etsilive, master, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
- Children:
- e4eaca5
- Parents:
- 5c07bfe
- Location:
- lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/libtrace_int.h
rc7e547e re375e0f 182 182 THREAD_PAUSED, 183 183 THREAD_STATE_MAX 184 }; 185 186 enum hash_owner { 187 HASH_OWNED_LIBTRACE, 188 HASH_OWNED_EXTERNAL, 184 189 }; 185 190 … … 347 352 fn_hasher hasher; 348 353 void *hasher_data; 354 enum hash_owner hasher_owner; 349 355 /** The pread_packet choosen path for the configuration */ 350 356 int (*pread)(libtrace_t *, libtrace_thread_t *, libtrace_packet_t **, size_t); -
lib/trace.c
r9375d2e re375e0f 271 271 libtrace->hasher = NULL; 272 272 libtrace->hasher_data = NULL; 273 libtrace->hasher_owner = HASH_OWNED_EXTERNAL; 273 274 libtrace_zero_ocache(&libtrace->packet_freelist); 274 275 libtrace_zero_thread(&libtrace->hasher_thread); … … 738 739 } 739 740 741 if (libtrace->hasher_owner == HASH_OWNED_LIBTRACE) { 742 if (libtrace->hasher_data) { 743 free(libtrace->hasher_data); 744 } 745 } 746 747 740 748 if (libtrace->perpkt_cbs) 741 749 trace_destroy_callback_set(libtrace->perpkt_cbs); -
lib/trace_parallel.c
r5c07bfe re375e0f 2160 2160 trace->hasher_type = type; 2161 2161 if (hasher) { 2162 if (trace->hasher_owner == HASH_OWNED_LIBTRACE) { 2163 if (trace->hasher_data) { 2164 free(trace->hasher_data); 2165 } 2166 } 2162 2167 trace->hasher = hasher; 2163 2168 trace->hasher_data = data; 2169 trace->hasher_owner = HASH_OWNED_EXTERNAL; 2164 2170 } else { 2165 2171 trace->hasher = NULL; 2166 2172 trace->hasher_data = NULL; 2173 trace->hasher_owner = HASH_OWNED_LIBTRACE; 2167 2174 } 2168 2175
Note: See TracChangeset
for help on using the changeset viewer.