Changeset 183


Ignore:
Timestamp:
03/17/10 02:50:15 (15 years ago)
Author:
tim
Message:

updated the threading test case for the new logging API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/regfi-threadtest.c

    r180 r183  
    3333/* Globals, influenced by command line parameters */
    3434bool print_verbose = false;
    35 char* registry_file = NULL;
     35const char* registry_file = NULL;
    3636
    3737/* Other globals */
     
    183183    bailOut(REGLOOKUP_EXIT_USAGE, "");
    184184  }
    185 
    186   if((registry_file = strdup(argv[argi])) == NULL)
    187     bailOut(REGLOOKUP_EXIT_OSERR, "ERROR: Memory allocation problem.\n");
     185  registry_file = argv[argi];
     186
     187  regfi_log_start(REGFI_LOG_INFO|REGFI_LOG_WARN|REGFI_LOG_ERROR);
    188188
    189189  fd = openHive(registry_file);
     
    200200    bailOut(REGLOOKUP_EXIT_NOINPUT, "ERROR: Failed to create REGFI_FILE structure.\n");
    201201  }
    202 
    203   regfi_set_message_mask(f, REGFI_MSG_INFO|REGFI_MSG_WARN|REGFI_MSG_ERROR);
    204202
    205203  threads = malloc(sizeof(pthread_t)*num_threads);
     
    213211
    214212  regfi_free(f);
     213  regfi_log_stop();
    215214  close(fd);
    216215
Note: See TracChangeset for help on using the changeset viewer.