Changeset 8a8881805e928890782ec2bddac168e025513149

Show
Ignore:
Timestamp:
02/22/08 21:13:09 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1203714789 +0000
git-parent:

[2656d6c95d43bd2784fdf0f72c3aa34e7bab7ef1]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1203714789 +0000
Message:

make modules that don't implement parts of the API not crash the system

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_check.c

    r3118b56 r8a88818  
    199199      if(NOIT_CHECK_LIVE(check)) 
    200200        continue; 
    201       if((check->flags & NP_DISABLED) == 0) 
    202         mod->initiate_check(mod, check, 0, NULL); 
     201      if((check->flags & NP_DISABLED) == 0) { 
     202        if(mod->initiate_check) 
     203          mod->initiate_check(mod, check, 0, NULL); 
     204      } 
    203205      else 
    204206        noitL(noit_debug, "Skipping %s`%s, disabled.\n", 
  • src/noit_module.c

    ra136e61 r8a88818  
    106106    config = noit_conf_get_hash(sections[i], "ancestor-or-self::node()/config/*"); 
    107107    module = noit_module_lookup(module_name); 
    108     if(module->config(module, config)) { 
     108    if(module->config && module->config(module, config)) { 
    109109      noitL(noit_stderr, 
    110110            "Configure failed on %s:%s\n", module_file, module_name); 
    111111      continue; 
    112112    } 
    113     if(module->init(module)) { 
     113    if(module->init && module->init(module)) { 
    114114      noitL(noit_stderr, 
    115115            "Initialized failed on %s:%s\n", module_file, module_name);