This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
sdk:connection-statistics [2017/10/10 15:01] fachet |
sdk:connection-statistics [2017/10/26 15:09] juraschek |
||
---|---|---|---|
Line 182: | Line 182: | ||
nb_syslog("Current Logsize: %i byte",this.currentLogSize); | nb_syslog("Current Logsize: %i byte",this.currentLogSize); | ||
//if we don't have enough space delete enough old ones to have enough space | //if we don't have enough space delete enough old ones to have enough space | ||
- | for(i=0;i<length(files);i++) { | ||
- | if (this.currentLogSize < (this.maxLogSize-this.freespace)) break; | ||
- | if(remove(sprintf("%s%s",this.path,files[i]))) { | ||
- | this.currentLogSize=this.currentLogSize-size[i]; | ||
- | nb_syslog("Removed %s%s",this.path,files[i]); | ||
- | } else { | ||
- | nb_syslog("could not remove %s%s",this.path,files[i]); | ||
- | } | ||
- | } | ||
- | nb_syslog("new logsize: %i", this.currentLogSize); | ||
return 0; | return 0; | ||
} | } |