]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'ticket31240v2_merged_2' into ticket31240v2_merged_2_merged
authorNick Mathewson <nickm@torproject.org>
Wed, 4 Sep 2019 12:41:42 +0000 (08:41 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 4 Sep 2019 12:41:42 +0000 (08:41 -0400)
1  2 
src/test/test_confparse.c

index 4df275fc36999f9fa900fe8f10f44713b79a5366,f04c412c0ece608862967b41ec285ccf66f5726d..cf2e8a80eefbd80804855c32c117f8bdb2b59a64
@@@ -584,20 -599,19 +599,23 @@@ static voi
  test_confparse_reset(void *arg)
  {
    (void)arg;
-   test_struct_t *tst = get_simple_config();
+   config_mgr_t *mgr = config_mgr_new(&test_fmt);
+   config_mgr_freeze(mgr);
+   test_struct_t *tst = get_simple_config(mgr);
  
-   config_reset_line(&test_fmt, tst, "interval", 0);
+   config_reset_line(mgr, tst, "interval", 0);
    tt_int_op(tst->interval, OP_EQ, 0);
  
-   config_reset_line(&test_fmt, tst, "interval", 1);
+   config_reset_line(mgr, tst, "interval", 1);
    tt_int_op(tst->interval, OP_EQ, 10);
  
 +  tt_ptr_op(tst->routerset, OP_NE, NULL);
 +  config_reset_line(&test_fmt, tst, "routerset", 0);
 +  tt_ptr_op(tst->routerset, OP_EQ, NULL);
 +
   done:
-   config_free(&test_fmt, tst);
+   config_free(mgr, tst);
+   config_mgr_free(mgr);
  }
  
  /* Try setting options a second time on a config object, and make sure