Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 20th, 2010  |  syntax: C  |  size: 0.67 KB  |  views: 144  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. --- apps/plugins/test_codec.c   (revision 24796)
  2. +++ apps/plugins/test_codec.c   (working copy)
  3.  -930,6 +930,10 @@
  4.              entry = rb->readdir(dir);
  5.              while (entry) {
  6.                  if (!(entry->attribute & ATTR_DIRECTORY)) {
  7. +                    /*close and reopen the handle in case the codec crashes so
  8. +                     data is less likely to be lost*/
  9. +                    rb->close(log_fd);
  10. +                    log_fd = rb->open(logfilename, O_RDWR|O_CREAT|O_APPEND);
  11.                      rb->snprintf(filename,sizeof(filename),"%s%s",dirpath,entry->d_name);
  12.                      test_track(filename);
  13.                      log_text("", true);
clone this paste RAW Paste Data