*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static pid_t hashjob = -1;
struct sharecache *shareroot = NULL;
static struct timer *scantimer = NULL;
static pid_t hashjob = -1;
struct sharecache *shareroot = NULL;
static struct timer *scantimer = NULL;
unsigned long long sharesize = 0;
GCBCHAIN(sharechangecb, unsigned long long);
unsigned long long sharesize = 0;
GCBCHAIN(sharechangecb, unsigned long long);
if((stream = fopen(hcname, "r")) == NULL)
{
flog(LOG_WARNING, "could not open hash cache %s: %s", hcname, strerror(errno));
if((stream = fopen(hcname, "r")) == NULL)
{
flog(LOG_WARNING, "could not open hash cache %s: %s", hcname, strerror(errno));
if((stream = fopen(hcname, "w")) == NULL)
{
flog(LOG_WARNING, "could not write hash cache %s: %s", hcname, strerror(errno));
if((stream = fopen(hcname, "w")) == NULL)
{
flog(LOG_WARNING, "could not write hash cache %s: %s", hcname, strerror(errno));
fprintf(stream, "# Dolda Connect hash cache file\n");
fprintf(stream, "# Generated automatically, do not edit\n");
fprintf(stream, "# Format: DEVICE INODE MTIME [HASH...]\n");
fprintf(stream, "# Dolda Connect hash cache file\n");
fprintf(stream, "# Generated automatically, do not edit\n");
fprintf(stream, "# Format: DEVICE INODE MTIME [HASH...]\n");
CBCHAINDOCB(node, share_delete, node);
CBCHAINFREE(node, share_delete);
sharesize -= node->size;
CBCHAINDOCB(node, share_delete, node);
CBCHAINFREE(node, share_delete);
sharesize -= node->size;