Show
Ignore:
Timestamp:
09/21/09 04:07:40 (9 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1253506060 +0000
git-parent:

[37daa37bbc546da8db4d76945b9c4b523e02d77b]

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

programmatic configuration will have to suffice for now, closes #182

Files:

Legend:

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

    r37daa37 r75ee62d  
    161161  UNLOCKFS(); 
    162162} 
     163int 
     164noit_filter_exists(const char *name) { 
     165  int removed; 
     166  void *v; 
     167  LOCKFS(); 
     168  removed = noit_hash_retrieve(filtersets, name, strlen(name), &v); 
     169  UNLOCKFS(); 
     170  return removed; 
     171} 
     172int 
     173noit_filter_remove(noit_conf_section_t vnode) { 
     174  int removed; 
     175  xmlNodePtr node = vnode; 
     176  char *name = (char *)node->name; 
     177  LOCKFS(); 
     178  removed = noit_hash_delete(filtersets, name, strlen(name), 
     179                             NULL, filterset_free); 
     180  UNLOCKFS(); 
     181  return removed; 
     182} 
    163183void 
    164184noit_filters_from_conf() { 
     
    392412  if(closure) { 
    393413    int removed; 
    394     LOCKFS(); 
    395     removed = noit_hash_delete(filtersets, argv[0], strlen(argv[0]), 
    396                                NULL, filterset_free); 
    397     UNLOCKFS(); 
     414    removed = noit_filter_remove(fsnode); 
    398415    nc_printf(ncct, "%sremoved filterset '%s'\n", 
    399416              removed ? "" : "failed to ", argv[0]);