X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fclient.c;h=50da10dea9f8ff906b6a49a527f9014922fb4c60;hb=99a28d474234a07081ea1beb28bb774169390314;hp=4a647e84f78cdb5eb14176e348df47c47464f83b;hpb=cd8a934ef184d23d0d0950b3af597d81993f4a46;p=doldaconnect.git diff --git a/daemon/client.c b/daemon/client.c index 4a647e8..50da10d 100644 --- a/daemon/client.c +++ b/daemon/client.c @@ -539,13 +539,10 @@ static void checkhashes(void) char *path; node = shareroot->child; - while(1) + for(node = shareroot->child; node != NULL; node = nextscnode(node)) { - if(node->child != NULL) - { - node = node->child; + if(node->f.b.type != FILE_REG) continue; - } if(!node->f.b.hastth) { if((hc = findhashcache(node->dev, node->inode)) != NULL) @@ -559,19 +556,14 @@ static void checkhashes(void) { flog(LOG_WARNING, "could not hash %s, unsharing it", path); freecache(node); + free(path); + flog(LOG_INFO, "sharing %lli bytes", sharesize); + continue; } free(path); return; } } - while(node->next == NULL) - { - if((node = node->parent) == shareroot) - break; - } - if(node == shareroot) - break; - node = node->next; } } @@ -932,7 +924,7 @@ int doscan(int quantum) } type = FILE_REG; } else { - flog(LOG_WARNING, "unhandled file type: %i", sb.st_mode); + flog(LOG_WARNING, "unhandled file type: 0%o", sb.st_mode); free(wcs); continue; }