#define TR_MAX_FILTERS 5
#define TR_MAX_FILTER_LINES 8
#define TR_MAX_FILTER_SPECS 8
-#define TR_MAX_FILTER_SPEC_MATCHES 8
+#define TR_MAX_FILTER_SPEC_MATCHES 64
/* Filter actions */
typedef enum {
"tr_internal": {
"max_tree_depth": 12,
"hostname":"beta.example.com",
- "trps_port":25308,
- "tids_port":25309,
+ "trps_port":12308,
+ "tids_port":12309,
"cfg_poll_interval": 1,
"cfg_settling_time": 5,
"trp_sweep_interval": 30,
TRP_UPD *upd=NULL;
guint ii=0;
- /* walk backward through the array so we can remove elements */
- for (ii=updates->len-1; ii>=0; ii--) {
- upd=g_ptr_array_index(updates, ii);
+ /* Walk backward through the array so we can remove elements. Careful about loop
+ * termination - remember that ii is unsigned. */
+ for (ii=updates->len; ii>0; ii--) {
+ upd=g_ptr_array_index(updates, ii-1);
trps_filter_one_outbound_update(tr_filter_set_get(filters, TR_FILTER_TYPE_TRP_OUTBOUND), upd);
/* see if we removed all the records from this update */
if (trp_upd_num_inforecs(upd)==0)
- g_ptr_array_remove_index_fast(updates, ii); /* does not preserve order at index ii or higher */
+ g_ptr_array_remove_index_fast(updates, ii-1); /* does not preserve order at index ii or higher */
}
}