Changeset 185 for test


Ignore:
Timestamp:
03/22/10 22:22:07 (15 years ago)
Author:
tim
Message:

reworked logging API again to simplify interface

updated regfi-threadtest to work with more recent commits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/regfi-threadtest.c

    r183 r185  
    4949void traverseValueList(REGFI_ITERATOR* iter)
    5050{
    51   REGFI_VK_REC* value;
     51  const REGFI_VK_REC* value;
    5252
    5353  value = regfi_iterator_first_value(iter);
     
    5555  {
    5656    printMsgs(iter->f);
    57     regfi_free_value(value);
     57    regfi_free_record(value);
    5858    value = regfi_iterator_next_value(iter);
    5959  }
     
    6565  const REGFI_NK_REC* root = NULL;
    6666  const REGFI_NK_REC* cur = NULL;
    67   REGFI_NK_REC* sub = NULL;
     67  const REGFI_NK_REC* sub = NULL;
    6868  const REGFI_SK_REC* sk;
    6969  bool print_this = true;
     
    116116      cur = regfi_iterator_cur_key(iter);
    117117      printMsgs(iter->f);
    118       regfi_free_key(sub);
     118      regfi_free_record(sub);
    119119
    120120      sub = regfi_iterator_first_subkey(iter);
     
    131131
    132132int num_iterations;
    133 void threadLoop(void* file)
     133void* threadLoop(void* file)
    134134{
    135135  REGFI_ITERATOR* iter;
    136136  int i;
    137137
     138  regfi_log_set_mask(REGFI_LOG_INFO|REGFI_LOG_WARN|REGFI_LOG_ERROR);
     139
    138140  iter = regfi_iterator_new((REGFI_FILE*)f, REGFI_ENCODING_ASCII);
    139141  if(iter == NULL)
     
    150152
    151153  regfi_iterator_free(iter);
     154
     155  return NULL;
    152156}
    153157
     
    185189  registry_file = argv[argi];
    186190
    187   regfi_log_start(REGFI_LOG_INFO|REGFI_LOG_WARN|REGFI_LOG_ERROR);
     191  regfi_log_set_mask(REGFI_LOG_INFO|REGFI_LOG_WARN|REGFI_LOG_ERROR);
    188192
    189193  fd = openHive(registry_file);
     
    211215
    212216  regfi_free(f);
    213   regfi_log_stop();
    214217  close(fd);
    215218
Note: See TracChangeset for help on using the changeset viewer.