Initialize hash, change init function name so it doesn't collide with fprobe-ulog's
[fprobe-ulog.git] / src / fprobe-ulog.c
index c744c01..80ff15f 100644 (file)
@@ -1159,8 +1159,8 @@ void *cap_thread()
                        flow->xid=0;
 
                        if (ulog_msg->mark > 0) {
-                               flow->xid = get_vhi_name(ulog_msg->mark);
-                               challenge = get_vhi_name(ulog_msg->mark);
+                /* flow->xid is really the slice id :-/ */
+                               flow->xid = xid_to_slice_id(ulog_msg->mark);
                        }
 
                        if (flow->xid < 1 || flow->xid!=challenge) 
@@ -1627,6 +1627,7 @@ bad_collector:
 
        /* Initialization */
 
+    init_slice_id_hash();
        hash_init(); /* Actually for crc16 only */
        mem_init(sizeof(struct Flow), bulk_quantity, memory_limit);
        for (i = 0; i < 1 << HASH_BITS; i++) pthread_mutex_init(&flows_mutex[i], 0);