view power.cpp @ 488:f4dc8e47ee37 api-inversion

Remove dump_query() function. It seems to have been used for printf debugging of test files and never removed. (Debuggers aren't great, but they are better than hand-maintained printing routines for this kind of thing; in particular, gdb will do this for you rather better than dump_query() did.)
author mas01cr
date Sat, 10 Jan 2009 15:32:49 +0000
parents 7038f31124d1
children
line wrap: on
line source
#include "audioDB.h"
extern "C" {
#include "audioDB_API.h"
#include "audioDB-internals.h"
}

int audiodb_power(adb_t *adb) {
  if(!(adb->flags & O_RDWR)) {
    return 1;
  }
  if(adb->header->length > 0) {
    return 1;
  }

  adb->header->flags |= O2_FLAG_POWER;
  return audiodb_sync_header(adb);
}