decoder.c
branchtrunk
changeset 29 640ce9201139
parent 25 887faebaba0a
child 33 65ed49cbc08b
equal deleted inserted replaced
28:38d35ff3d93f 29:640ce9201139
   218       if(S_ISREG(ds.st_mode)) {
   218       if(S_ISREG(ds.st_mode)) {
   219         free(FsID); FsID=0;
   219         free(FsID); FsID=0;
   220         FsType=0;
   220         FsType=0;
   221         struct statfs64 sfs;
   221         struct statfs64 sfs;
   222         if(!statfs64(Filename,&sfs)) {
   222         if(!statfs64(Filename,&sfs)) {
   223           if(Removable()) asprintf(&FsID,"%llx:%llx",sfs.f_blocks,sfs.f_files);
   223           if(Removable()) FsID=aprintf("%llx:%llx",sfs.f_blocks,sfs.f_files);
   224           FsType=sfs.f_type;
   224           FsType=sfs.f_type;
   225           }
   225           }
   226         else if(errno!=ENOSYS && log) { esyslog("ERROR: can't statfs %s: %s",Filename,strerror(errno)); }
   226         else if(errno!=ENOSYS && log) { esyslog("ERROR: can't statfs %s: %s",Filename,strerror(errno)); }
   227         Filesize=ds.st_size;
   227         Filesize=ds.st_size;
   228         CTime=ds.st_ctime;
   228         CTime=ds.st_ctime;
   600 }
   600 }
   601 
   601 
   602 void cInfoCache::Action(void)
   602 void cInfoCache::Action(void)
   603 {
   603 {
   604   d(printf("cache: id3 cache purge thread started (pid=%d)\n",getpid()))
   604   d(printf("cache: id3 cache purge thread started (pid=%d)\n",getpid()))
   605   nice(3);
   605   if(nice(3)<0);
   606   lock.Lock();
   606   lock.Lock();
   607   for(int i=0,n=0 ; i<CACHELINES && Running(); i++) {
   607   for(int i=0,n=0 ; i<CACHELINES && Running(); i++) {
   608     cCacheData *dat=FirstEntry(i);
   608     cCacheData *dat=FirstEntry(i);
   609     while(dat && Running()) {
   609     while(dat && Running()) {
   610       cCacheData *ndat=(cCacheData *)dat->Next();
   610       cCacheData *ndat=(cCacheData *)dat->Next();