Changeset 228 for trunk/src


Ignore:
Timestamp:
04/18/11 16:25:46 (14 years ago)
Author:
tim
Message:

added a test case for pyregfi multithreaded use
updated the regfi multithreaded test case
fixed several ctypes interface problems in pyregfi
added locking to pyregfi iterators for thread safety
fixed regfi talloc race conditions with an additional lock

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/reglookup-recover.c

    r223 r228  
    291291        {
    292292          /* XXX: Need to add a warning here */
    293           regfi_free_record(cur_ancestor);
     293          regfi_free_record(f, cur_ancestor);
    294294          void_stack_free(path_stack);
    295295          return NULL;
     
    303303        ret_val_size += path_element->len + 1;
    304304
    305         regfi_free_record(cur_ancestor);
     305        regfi_free_record(f, cur_ancestor);
    306306      }
    307307    }
     
    631631
    632632 fail:
    633   regfi_free_record(key);
     633  regfi_free_record(f, key);
    634634  return error_code;
    635635}
  • trunk/src/reglookup.c

    r213 r228  
    9595      fprintf(stderr, "WARN: While quoting value for '%s/%s', "
    9696              "warning returned: %s\n", prefix, quoted_name, conv_error);
    97     regfi_free_record(data);
     97    regfi_free_record(iter->f, data);
    9898  }
    9999
     
    282282    if(!type_filter_enabled || (value->type == type_filter))
    283283      printValue(iter, value, prefix);
    284     regfi_free_record(value);
     284    regfi_free_record(iter->f, value);
    285285    regfi_iterator_next_value(iter);
    286286    printMsgs(iter->f);
     
    310310    sacl = regfi_get_sacl(sk->sec_desc);
    311311    dacl = regfi_get_dacl(sk->sec_desc);
    312     regfi_free_record(sk);
     312    regfi_free_record(iter->f, sk);
    313313
    314314    if(owner == NULL)
     
    345345    else
    346346      quoted_classname = empty_str;
    347     regfi_free_record(classname);
     347    regfi_free_record(iter->f, classname);
    348348
    349349    printMsgs(iter->f);
     
    365365    printf("%s,KEY,,%s\n", full_path, mtime);
    366366
    367   regfi_free_record(key);
     367  regfi_free_record(iter->f, key);
    368368}
    369369
     
    406406      if(cur != root)
    407407      {
    408         regfi_free_record(cur);
     408        regfi_free_record(iter->f, cur);
    409409        /* We're done with this sub-tree, going up and hitting other branches. */
    410410        if(!regfi_iterator_up(iter))
     
    430430       * Let's move down and print this first sub-tree out.
    431431       */
    432       regfi_free_record(cur);
     432      regfi_free_record(iter->f, cur);
    433433      if(!regfi_iterator_down(iter))
    434434      {
     
    438438
    439439      cur = regfi_iterator_cur_key(iter);
    440       regfi_free_record(sub);
     440      regfi_free_record(iter->f, sub);
    441441      regfi_iterator_first_subkey(iter);
    442442      sub = regfi_iterator_cur_subkey(iter);
     
    445445    printMsgs(iter->f);
    446446  } while(!((cur == root) && (sub == NULL)));
    447   regfi_free_record(root);
     447  regfi_free_record(iter->f, root);
    448448
    449449  if(print_verbose)
     
    518518      printValue(iter, value, tmp_path_joined);
    519519
    520     regfi_free_record(value);
     520    regfi_free_record(iter->f, value);
    521521    free(tmp_path);
    522522    free(tmp_path_joined);
Note: See TracChangeset for help on using the changeset viewer.