MCPcopy Create free account
hub / github.com/3proxy/3proxy / dobuf

Function dobuf

src/common.c:604–620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602}
603
604int dobuf(struct clientparam * param, unsigned char * buf, const unsigned char *s, const unsigned char * doublec){
605 struct tm* tm;
606 int i;
607 char * format;
608 time_t t;
609
610 time(&t);
611 if(!param) return 0;
612 if(param->trafcountfunc)(*param->trafcountfunc)(param);
613 format = (char *)param->srv->logformat;
614 if(!format) format = "G%y%m%d%H%M%S.%. %p %E %U %C:%c %R:%r %O %I %h %T";
615 tm = (*format == 'G' || *format == 'g')?
616 gmtime(&t) : localtime(&t);
617 i = dobuf2(param, buf, s, doublec, tm, format + 1);
618 clearstat(param);
619 return i;
620}
621
622void lognone(struct clientparam * param, const unsigned char *s) {
623 if(param->trafcountfunc)(*param->trafcountfunc)(param);

Callers 3

logsqlFunction · 0.85
logstdoutFunction · 0.85
logsyslogFunction · 0.85

Calls 2

dobuf2Function · 0.85
clearstatFunction · 0.85

Tested by

no test coverage detected